Friesian Pedigree Database
friesianpedigreeswiki
https://friesianpedigrees.miraheze.org/wiki/Main_Page
MediaWiki 1.40.1
first-letter
Media
Special
Talk
User
User talk
Friesian Pedigree Database
Friesian Pedigree Database talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Module
Module talk
Template:Clear
10
13
33
2022-03-08T14:12:32Z
DarkMatterMan4500
5
Created page with "<div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude>"
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>
{{documentation}}
</noinclude>
38bab3e3d7fbd3d6800d46556e60bc6bac494d72
34
33
2023-05-13T02:54:40Z
WAGRC1
2
1 revision imported from [[:dev:Template:Clear]]
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>
{{documentation}}
</noinclude>
38bab3e3d7fbd3d6800d46556e60bc6bac494d72
35
34
2023-10-03T08:06:20Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>
{{documentation}}
</noinclude>
38bab3e3d7fbd3d6800d46556e60bc6bac494d72
Template:Tl
10
11
27
2022-09-30T01:09:19Z
dev>Pppery
0
Redirected page to [[Template:Template link]]
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
fb9a6b420e13178e581af6e7d64274cd30a79017
28
27
2023-05-13T02:54:39Z
WAGRC1
2
1 revision imported from [[:dev:Template:Tl]]
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
fb9a6b420e13178e581af6e7d64274cd30a79017
29
28
2023-10-03T08:06:18Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
fb9a6b420e13178e581af6e7d64274cd30a79017
Template:Template link
10
12
30
2022-09-30T01:10:00Z
dev>Pppery
0
46 revisions imported from [[:wikipedia:Template:Template_link]]
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
eabbec62efe3044a98ebb3ce9e7d4d43c222351d
31
30
2023-05-13T02:54:39Z
WAGRC1
2
1 revision imported from [[:dev:Template:Template_link]]
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
eabbec62efe3044a98ebb3ce9e7d4d43c222351d
32
31
2023-10-03T08:06:19Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
eabbec62efe3044a98ebb3ce9e7d4d43c222351d
Template:Documentation
10
6
12
2022-09-30T01:43:37Z
MacFan4000
4
4 revisions imported from [[:meta:Template:Documentation]]: this is useful and was on templateiwki
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude>
9885bb4fa99bf3d5b960e73606bbb8eed3026877
13
12
2023-05-13T02:54:36Z
WAGRC1
2
1 revision imported from [[:dev:Template:Documentation]]
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude>
9885bb4fa99bf3d5b960e73606bbb8eed3026877
14
13
2023-10-03T08:06:16Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude>
9885bb4fa99bf3d5b960e73606bbb8eed3026877
Module:Arguments
828
8
18
2022-09-30T02:32:01Z
dev>Pppery
0
24 revisions imported from [[:wikipedia:Module:Arguments]]
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
19
18
2023-05-13T02:54:37Z
WAGRC1
2
1 revision imported from [[:dev:Module:Arguments]]
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
20
19
2023-10-03T08:06:16Z
WAGRC1
2
2 revisions imported
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Module:Documentation
828
7
15
2022-09-30T02:36:08Z
dev>Pppery
0
Pppery moved page [[Module:Documentation/2]] to [[Module:Documentation]] without leaving a redirect
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
78cc3a78f2b5dbb267fa16027c0800a22dbd3c42
16
15
2023-05-13T02:54:38Z
WAGRC1
2
1 revision imported from [[:dev:Module:Documentation]]
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
78cc3a78f2b5dbb267fa16027c0800a22dbd3c42
17
16
2023-10-03T08:06:16Z
WAGRC1
2
2 revisions imported
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
78cc3a78f2b5dbb267fa16027c0800a22dbd3c42
Template:Infobox
10
3
3
2022-09-30T14:45:57Z
dev>Pppery
0
Copy from Wikipedia
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<noinclude>
{{documentation}}
</noinclude>
627ee6fcf4d4f108fe054b5c476201cad0ed7717
4
3
2023-05-13T02:54:36Z
WAGRC1
2
1 revision imported from [[:dev:Template:Infobox]]
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<noinclude>
{{documentation}}
</noinclude>
627ee6fcf4d4f108fe054b5c476201cad0ed7717
5
4
2023-10-03T08:06:14Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<noinclude>
{{documentation}}
</noinclude>
627ee6fcf4d4f108fe054b5c476201cad0ed7717
Module:Infobox
828
5
9
2022-09-30T14:52:23Z
dev>Pppery
0
Scribunto
text/plain
--
-- This module implements {{Infobox}}
--
local p = {}
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderItalicTitle()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
c6ac51f9e2faf9c2f3aba1fb8c05af98db47f4d4
10
9
2023-05-13T02:54:40Z
WAGRC1
2
1 revision imported from [[:dev:Module:Infobox]]
Scribunto
text/plain
--
-- This module implements {{Infobox}}
--
local p = {}
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderItalicTitle()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
c6ac51f9e2faf9c2f3aba1fb8c05af98db47f4d4
11
10
2023-10-03T08:06:15Z
WAGRC1
2
2 revisions imported
Scribunto
text/plain
--
-- This module implements {{Infobox}}
--
local p = {}
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderItalicTitle()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
c6ac51f9e2faf9c2f3aba1fb8c05af98db47f4d4
Template:Infobox/doc
10
4
6
2022-09-30T19:09:06Z
dev>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[w:Help:Infobox]] contains an introduction about the recommended content and design of infoboxes.
== Usage ==
Usage is similar to {{tl|navbox}}, but with an additional distinction. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field.
== Optional control parameters ==
; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox, pointing to the named page. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however this is rarely what you want, because it will send users clicking these links in an infobox in an article to the template code rather than the data in the infobox that they probably want to change.
; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it.
; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes".
; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it.
== Content parameters ==
=== Title ===
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts as a caption it on top of the table. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended):
; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
; above : Text to put within the uppermost cell of the table.
; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images.
Examples:
{{Infobox
| name = Infobox/doc
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
{{Infobox
| name = Infobox/doc
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
=== Illustration images ===
; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default.
; caption(n) : Text to put underneath the images.
=== Main data ===
; header(n) : Text to use as a header in row n.
; label(n) : Text to use as a label in row n.
; data(n) : Text to display as data in row n.
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a header''(n)'' parameter will cause the corresponding data''(n)'' (and rowclass''(n)'' label''(n)'', see below) parameters to be ignored; the absence of a data''(n)'' parameters will cause the corresponding label''(n)'' parameters to be ignored. Valid combinations for any single row are:
* |class''(n)''= |header''(n)''=
* |rowclass''(n)'= |class''(n)''= |data''(n)''=
* |rowclass''(n)''= |label''(n)''= |class''(n)''= data''(n)''=
See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below.
==== Number ranges ====
To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example:
<pre style="overflow:auto">
| header3 = Section 1
| label5 = Label A
| data5 = Data A
| label7 = Label C
| data7 = Data C
| header10 = Section 2
| label12 = Label D
| data12 = Data D
</pre>{{clear}}
==== Making data fields optional ====
A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
<pre style="overflow:auto">
| label5 = Population
| data5 = {{{population|}}}
</pre>{{clear}}
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
<pre style="overflow:auto">
| label6 = Mass
| data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }}
</pre>{{clear}}
For more on #if, see [[mw:Help:Extension:ParserFunctions##if|here]].
==== Hiding headers when all data fields are hidden ====
You can also make headers optional in a similar way. Consider this example:
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
If you want the first header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next static content. The trick to this is that the "#if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item1, item2 and item3 are undefined will the if statement fail.
Note that such trick may be sometimes very complex to test if there are many data items whose value depends on complex tests (or when a data row is generated by a recursive invocation of this template as a [[#Subboxes|subbox]]). Ideally, the Lua module supporting this template should now support a new way to make each header row autohideable by detecting if there is at least one non-empty data row after that header row (a parameter like "autohide header1 = yes", for example, would remove the need to perform the "#if" test so that we can just to define "header1 = Optional header"),
=== Footer ===
; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.
== Presentation parameters ==
=== Italic titles ===
Titles of articles with infoboxes may be made italic by passing the <code>italic title</code> parameter.
* Turn on italic titles by passing |italic title=<nowiki>{{{italic title|}}}</nowiki> from the infobox.
* Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing |italic title=<nowiki>{{{italic title|no}}}</nowiki>
* Do not make any titles italic by not passing the parameter at all.
=== CSS styling ===
; bodystyle : Applies to the infobox table as a whole
; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox.
; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle.
; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future.
; captionstyle : Applies to the text of the image caption.
; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row.
; headerstyle : Applies to all header cells
; labelstyle : Applies to all label cells
; datastyle : Applies to all data cells
; belowstyle : Applies only to the below cell
=== HTML classes and microformats ===
; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole.
; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption.
<!-- currently not implemented in Lua module
; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on.
-->
; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell.
; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on.
; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''.
; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on.
; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''.
; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells.
; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect.
<!-- currently not implemented in Lua module
; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on.
-->
; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others beig used for microformats.
To flag an infobox as containing [[w:hCard|hCard]] information, for example, add the following parameter:
<pre style="overflow:auto">
| bodyclass = vcard
</pre>{{clear}}
And for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
<pre style="overflow:auto">
| class1 = fn
| class2 = org
| class3 = tel
</pre>{{clear}}
...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
See [[w:microformat]] for more information on microformats in general.
== Examples ==
Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell :
{{Infobox
|name = Infobox/doc
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below File:Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
<pre style="overflow:auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
</pre>{{clear}}
For this example, the '''bodystyle''' and '''labelstyle''' parameters are used to adjust the infobox width and define a default width for the column of labels:
{{Infobox
|name = Infobox/doc
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
<pre style="overflow: auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
</pre>{{clear}}
== Embedding ==
One infobox template can be embedded into another using the |child= parameter or the |embed= parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>.
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
or,
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note that omitting the |title= parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation.
== Subboxes ==
An alternative method for embedding is to use |subbox=yes, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table.
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
<source lang="sass" style="overflow:auto">
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
</source>{{clear}}
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
== Full blank syntax ==
(Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| child = {{{child|}}}
| subbox = {{{subbox|}}}
| italic title = {{{italic title|no}}}
| bodystyle =
| titlestyle =
| abovestyle =
| subheaderstyle =
| title =
| above =
| subheader =
| imagestyle =
| captionstyle =
| image =
| caption =
| image2 =
| caption2 =
| headerstyle =
| labelstyle =
| datastyle =
| header1 =
| label1 =
| data1 =
| header2 =
| label2 =
| data2 =
| header3 =
| label3 =
| data3 =
| header4 =
| label4 =
| data4 =
| header5 =
| label5 =
| data5 =
| header6 =
| label6 =
| data6 =
| header7 =
| label7 =
| data7 =
| header8 =
| label8 =
| data8 =
| header9 =
| label9 =
| data9 =
| header10 =
| label10 =
| data10 =
| header11 =
| label11 =
| data11 =
| header12 =
| label12 =
| data12 =
| header13 =
| label13 =
| data13 =
| header14 =
| label14 =
| data14 =
| header15 =
| label15 =
| data15 =
| header16 =
| label16 =
| data16 =
| header17 =
| label17 =
| data17 =
| header18 =
| label18 =
| data18 =
| header19 =
| label19 =
| data19 =
| header20 =
| label20 =
| data20 =
| belowstyle =
| below =
}}
</pre>{{clear}}
==See also==
* [[Module:Infobox]], the [[mw:Lua/Overview|Lua]] module on which this template is based
* [[w:Wikipedia:List of infoboxes|List of infoboxes]]
38686ab37d436b2158042649ea6e552897fbcfa5
7
6
2023-05-13T02:54:41Z
WAGRC1
2
1 revision imported from [[:dev:Template:Infobox/doc]]
wikitext
text/x-wiki
{{Documentation subpage}}
This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[w:Help:Infobox]] contains an introduction about the recommended content and design of infoboxes.
== Usage ==
Usage is similar to {{tl|navbox}}, but with an additional distinction. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field.
== Optional control parameters ==
; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox, pointing to the named page. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however this is rarely what you want, because it will send users clicking these links in an infobox in an article to the template code rather than the data in the infobox that they probably want to change.
; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it.
; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes".
; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it.
== Content parameters ==
=== Title ===
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts as a caption it on top of the table. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended):
; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
; above : Text to put within the uppermost cell of the table.
; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images.
Examples:
{{Infobox
| name = Infobox/doc
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
{{Infobox
| name = Infobox/doc
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
=== Illustration images ===
; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default.
; caption(n) : Text to put underneath the images.
=== Main data ===
; header(n) : Text to use as a header in row n.
; label(n) : Text to use as a label in row n.
; data(n) : Text to display as data in row n.
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a header''(n)'' parameter will cause the corresponding data''(n)'' (and rowclass''(n)'' label''(n)'', see below) parameters to be ignored; the absence of a data''(n)'' parameters will cause the corresponding label''(n)'' parameters to be ignored. Valid combinations for any single row are:
* |class''(n)''= |header''(n)''=
* |rowclass''(n)'= |class''(n)''= |data''(n)''=
* |rowclass''(n)''= |label''(n)''= |class''(n)''= data''(n)''=
See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below.
==== Number ranges ====
To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example:
<pre style="overflow:auto">
| header3 = Section 1
| label5 = Label A
| data5 = Data A
| label7 = Label C
| data7 = Data C
| header10 = Section 2
| label12 = Label D
| data12 = Data D
</pre>{{clear}}
==== Making data fields optional ====
A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
<pre style="overflow:auto">
| label5 = Population
| data5 = {{{population|}}}
</pre>{{clear}}
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
<pre style="overflow:auto">
| label6 = Mass
| data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }}
</pre>{{clear}}
For more on #if, see [[mw:Help:Extension:ParserFunctions##if|here]].
==== Hiding headers when all data fields are hidden ====
You can also make headers optional in a similar way. Consider this example:
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
If you want the first header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next static content. The trick to this is that the "#if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item1, item2 and item3 are undefined will the if statement fail.
Note that such trick may be sometimes very complex to test if there are many data items whose value depends on complex tests (or when a data row is generated by a recursive invocation of this template as a [[#Subboxes|subbox]]). Ideally, the Lua module supporting this template should now support a new way to make each header row autohideable by detecting if there is at least one non-empty data row after that header row (a parameter like "autohide header1 = yes", for example, would remove the need to perform the "#if" test so that we can just to define "header1 = Optional header"),
=== Footer ===
; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.
== Presentation parameters ==
=== Italic titles ===
Titles of articles with infoboxes may be made italic by passing the <code>italic title</code> parameter.
* Turn on italic titles by passing |italic title=<nowiki>{{{italic title|}}}</nowiki> from the infobox.
* Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing |italic title=<nowiki>{{{italic title|no}}}</nowiki>
* Do not make any titles italic by not passing the parameter at all.
=== CSS styling ===
; bodystyle : Applies to the infobox table as a whole
; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox.
; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle.
; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future.
; captionstyle : Applies to the text of the image caption.
; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row.
; headerstyle : Applies to all header cells
; labelstyle : Applies to all label cells
; datastyle : Applies to all data cells
; belowstyle : Applies only to the below cell
=== HTML classes and microformats ===
; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole.
; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption.
<!-- currently not implemented in Lua module
; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on.
-->
; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell.
; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on.
; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''.
; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on.
; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''.
; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells.
; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect.
<!-- currently not implemented in Lua module
; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on.
-->
; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others beig used for microformats.
To flag an infobox as containing [[w:hCard|hCard]] information, for example, add the following parameter:
<pre style="overflow:auto">
| bodyclass = vcard
</pre>{{clear}}
And for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
<pre style="overflow:auto">
| class1 = fn
| class2 = org
| class3 = tel
</pre>{{clear}}
...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
See [[w:microformat]] for more information on microformats in general.
== Examples ==
Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell :
{{Infobox
|name = Infobox/doc
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below File:Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
<pre style="overflow:auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
</pre>{{clear}}
For this example, the '''bodystyle''' and '''labelstyle''' parameters are used to adjust the infobox width and define a default width for the column of labels:
{{Infobox
|name = Infobox/doc
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
<pre style="overflow: auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
</pre>{{clear}}
== Embedding ==
One infobox template can be embedded into another using the |child= parameter or the |embed= parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>.
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
or,
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note that omitting the |title= parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation.
== Subboxes ==
An alternative method for embedding is to use |subbox=yes, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table.
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
<source lang="sass" style="overflow:auto">
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
</source>{{clear}}
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
== Full blank syntax ==
(Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| child = {{{child|}}}
| subbox = {{{subbox|}}}
| italic title = {{{italic title|no}}}
| bodystyle =
| titlestyle =
| abovestyle =
| subheaderstyle =
| title =
| above =
| subheader =
| imagestyle =
| captionstyle =
| image =
| caption =
| image2 =
| caption2 =
| headerstyle =
| labelstyle =
| datastyle =
| header1 =
| label1 =
| data1 =
| header2 =
| label2 =
| data2 =
| header3 =
| label3 =
| data3 =
| header4 =
| label4 =
| data4 =
| header5 =
| label5 =
| data5 =
| header6 =
| label6 =
| data6 =
| header7 =
| label7 =
| data7 =
| header8 =
| label8 =
| data8 =
| header9 =
| label9 =
| data9 =
| header10 =
| label10 =
| data10 =
| header11 =
| label11 =
| data11 =
| header12 =
| label12 =
| data12 =
| header13 =
| label13 =
| data13 =
| header14 =
| label14 =
| data14 =
| header15 =
| label15 =
| data15 =
| header16 =
| label16 =
| data16 =
| header17 =
| label17 =
| data17 =
| header18 =
| label18 =
| data18 =
| header19 =
| label19 =
| data19 =
| header20 =
| label20 =
| data20 =
| belowstyle =
| below =
}}
</pre>{{clear}}
==See also==
* [[Module:Infobox]], the [[mw:Lua/Overview|Lua]] module on which this template is based
* [[w:Wikipedia:List of infoboxes|List of infoboxes]]
38686ab37d436b2158042649ea6e552897fbcfa5
8
7
2023-10-03T08:06:14Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
{{Documentation subpage}}
This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[w:Help:Infobox]] contains an introduction about the recommended content and design of infoboxes.
== Usage ==
Usage is similar to {{tl|navbox}}, but with an additional distinction. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field.
== Optional control parameters ==
; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox, pointing to the named page. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however this is rarely what you want, because it will send users clicking these links in an infobox in an article to the template code rather than the data in the infobox that they probably want to change.
; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it.
; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes".
; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it.
== Content parameters ==
=== Title ===
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts as a caption it on top of the table. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended):
; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
; above : Text to put within the uppermost cell of the table.
; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images.
Examples:
{{Infobox
| name = Infobox/doc
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| title = Text in caption over infobox
| subheader = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
{{Infobox
| name = Infobox/doc
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| above = Text in uppermost cell of infobox
| subheader = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
</pre>{{clear}}
=== Illustration images ===
; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default.
; caption(n) : Text to put underneath the images.
=== Main data ===
; header(n) : Text to use as a header in row n.
; label(n) : Text to use as a label in row n.
; data(n) : Text to display as data in row n.
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a header''(n)'' parameter will cause the corresponding data''(n)'' (and rowclass''(n)'' label''(n)'', see below) parameters to be ignored; the absence of a data''(n)'' parameters will cause the corresponding label''(n)'' parameters to be ignored. Valid combinations for any single row are:
* |class''(n)''= |header''(n)''=
* |rowclass''(n)'= |class''(n)''= |data''(n)''=
* |rowclass''(n)''= |label''(n)''= |class''(n)''= data''(n)''=
See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below.
==== Number ranges ====
To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example:
<pre style="overflow:auto">
| header3 = Section 1
| label5 = Label A
| data5 = Data A
| label7 = Label C
| data7 = Data C
| header10 = Section 2
| label12 = Label D
| data12 = Data D
</pre>{{clear}}
==== Making data fields optional ====
A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
<pre style="overflow:auto">
| label5 = Population
| data5 = {{{population|}}}
</pre>{{clear}}
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
<pre style="overflow:auto">
| label6 = Mass
| data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }}
</pre>{{clear}}
For more on #if, see [[mw:Help:Extension:ParserFunctions##if|here]].
==== Hiding headers when all data fields are hidden ====
You can also make headers optional in a similar way. Consider this example:
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an undesirable header
| header1 = Undesirable header
| label2 = Item 1 | data2 =
| label3 = Item 2 | data3 =
| label4 = Item 3 | data4 =
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
If you want the first header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
<pre style="overflow:auto">
{{Infobox
| title = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
| label2 = Item 1 | data2 = {{{item1|}}}
| label3 = Item 2 | data3 = {{{item2|}}}
| label4 = Item 3 | data4 = {{{item3|}}}
| header5 = Static header
| label6 = Static item | data6 = Static value
}}
</pre>{{clear}}
header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next static content. The trick to this is that the "#if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item1, item2 and item3 are undefined will the if statement fail.
Note that such trick may be sometimes very complex to test if there are many data items whose value depends on complex tests (or when a data row is generated by a recursive invocation of this template as a [[#Subboxes|subbox]]). Ideally, the Lua module supporting this template should now support a new way to make each header row autohideable by detecting if there is at least one non-empty data row after that header row (a parameter like "autohide header1 = yes", for example, would remove the need to perform the "#if" test so that we can just to define "header1 = Optional header"),
=== Footer ===
; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.
== Presentation parameters ==
=== Italic titles ===
Titles of articles with infoboxes may be made italic by passing the <code>italic title</code> parameter.
* Turn on italic titles by passing |italic title=<nowiki>{{{italic title|}}}</nowiki> from the infobox.
* Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing |italic title=<nowiki>{{{italic title|no}}}</nowiki>
* Do not make any titles italic by not passing the parameter at all.
=== CSS styling ===
; bodystyle : Applies to the infobox table as a whole
; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox.
; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle.
; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future.
; captionstyle : Applies to the text of the image caption.
; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row.
; headerstyle : Applies to all header cells
; labelstyle : Applies to all label cells
; datastyle : Applies to all data cells
; belowstyle : Applies only to the below cell
=== HTML classes and microformats ===
; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole.
; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption.
<!-- currently not implemented in Lua module
; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on.
-->
; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell.
; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on.
; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''.
; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on.
; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''.
; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells.
; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect.
<!-- currently not implemented in Lua module
; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on.
-->
; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others beig used for microformats.
To flag an infobox as containing [[w:hCard|hCard]] information, for example, add the following parameter:
<pre style="overflow:auto">
| bodyclass = vcard
</pre>{{clear}}
And for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
<pre style="overflow:auto">
| class1 = fn
| class2 = org
| class3 = tel
</pre>{{clear}}
...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
See [[w:microformat]] for more information on microformats in general.
== Examples ==
Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell :
{{Infobox
|name = Infobox/doc
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below File:Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
<pre style="overflow:auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle =
|titlestyle =
|abovestyle = background:#cfc;
|subheaderstyle =
|title = Test Infobox
|above = Above text
|subheader = Subheader above image
|subheader2 = Second subheader
|imagestyle =
|captionstyle =
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Caption displayed below Example-serious.jpg
|headerstyle = background:#ccf;
|labelstyle = background:#ddf;
|datastyle =
|header1 = Header defined alone
| label1 =
| data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
| data2 =
|header3 =
| label3 =
| data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
| data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
| data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below = Below text
}}
</pre>{{clear}}
For this example, the '''bodystyle''' and '''labelstyle''' parameters are used to adjust the infobox width and define a default width for the column of labels:
{{Infobox
|name = Infobox/doc
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
<pre style="overflow: auto">
{{Infobox
|name = {{subst:PAGENAME}}
|bodystyle = width:20em
|titlestyle =
|title = Test Infobox
|headerstyle =
|labelstyle = width:33%
|datastyle =
|header1 =
| label1 = Label 1
| data1 = Data 1
|header2 =
| label2 = Label 2
| data2 = Data 2
|header3 =
| label3 = Label 3
| data3 = Data 3
|header4 = Header 4
| label4 =
| data4 =
|header5 =
| label5 = Label 5
| data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
</pre>{{clear}}
== Embedding ==
One infobox template can be embedded into another using the |child= parameter or the |embed= parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>.
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| data2 = {{Infobox | decat = yes | child = yes
|title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
| title = First subsection
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = {{Infobox | decat = yes | child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
or,
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox | decat = yes | child = yes
| label1 = Label 2.1
| data1 = Data 2.1
}}
| belowstyle =
| below = Below text
}}
</pre>{{clear}}
Note that omitting the |title= parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation.
== Subboxes ==
An alternative method for embedding is to use |subbox=yes, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table.
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
<source lang="sass" style="overflow:auto">
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
| data3 = {{Infobox | subbox = yes
| headerstyle = background-color:#ccc;
| labelstyle = background-color:#ddd;
| header1 = Sub 3-1
| header2 = Sub 3-2
| label3 = Label 3-3 | data3 = Data 3-3
}}
| data4 = {{Infobox | subbox = yes
| labelstyle = background-color:#ccc;
| label1 = Label 4-1 | data1 = Data 4-1
}}
| label5 = Label 5 | data5 = Data 5
| header6 = Main 6
}}
</source>{{clear}}
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
== Full blank syntax ==
(Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
<pre style="overflow:auto">
{{Infobox
| name = {{subst:PAGENAME}}
| child = {{{child|}}}
| subbox = {{{subbox|}}}
| italic title = {{{italic title|no}}}
| bodystyle =
| titlestyle =
| abovestyle =
| subheaderstyle =
| title =
| above =
| subheader =
| imagestyle =
| captionstyle =
| image =
| caption =
| image2 =
| caption2 =
| headerstyle =
| labelstyle =
| datastyle =
| header1 =
| label1 =
| data1 =
| header2 =
| label2 =
| data2 =
| header3 =
| label3 =
| data3 =
| header4 =
| label4 =
| data4 =
| header5 =
| label5 =
| data5 =
| header6 =
| label6 =
| data6 =
| header7 =
| label7 =
| data7 =
| header8 =
| label8 =
| data8 =
| header9 =
| label9 =
| data9 =
| header10 =
| label10 =
| data10 =
| header11 =
| label11 =
| data11 =
| header12 =
| label12 =
| data12 =
| header13 =
| label13 =
| data13 =
| header14 =
| label14 =
| data14 =
| header15 =
| label15 =
| data15 =
| header16 =
| label16 =
| data16 =
| header17 =
| label17 =
| data17 =
| header18 =
| label18 =
| data18 =
| header19 =
| label19 =
| data19 =
| header20 =
| label20 =
| data20 =
| belowstyle =
| below =
}}
</pre>{{clear}}
==See also==
* [[Module:Infobox]], the [[mw:Lua/Overview|Lua]] module on which this template is based
* [[w:Wikipedia:List of infoboxes|List of infoboxes]]
38686ab37d436b2158042649ea6e552897fbcfa5
Module:Documentation/config
828
9
21
2022-10-01T17:37:53Z
dev>Pppery
0
Pppery moved page [[Module:Documentation/config/2]] to [[Module:Documentation/config]] without leaving a redirect
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
d70e8b1402a2bbe08a1fef4b75d743e661af0c95
22
21
2023-05-13T02:54:38Z
WAGRC1
2
1 revision imported from [[:dev:Module:Documentation/config]]
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
d70e8b1402a2bbe08a1fef4b75d743e661af0c95
23
22
2023-10-03T08:06:17Z
WAGRC1
2
2 revisions imported
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
d70e8b1402a2bbe08a1fef4b75d743e661af0c95
Template:Documentation subpage
10
10
24
2022-10-01T17:51:17Z
dev>Pppery
0
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
471e685c1c643a5c6272e20e49824fffebad0448
25
24
2023-05-13T02:54:37Z
WAGRC1
2
1 revision imported from [[:dev:Template:Documentation_subpage]]
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
471e685c1c643a5c6272e20e49824fffebad0448
26
25
2023-10-03T08:06:18Z
WAGRC1
2
2 revisions imported
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
471e685c1c643a5c6272e20e49824fffebad0448
Main Page
0
1
1
2023-10-02T11:37:32Z
MediaWiki default
1
Create main page
wikitext
text/x-wiki
__NOTOC__
== Welcome to {{SITENAME}}! ==
This Main Page was created automatically and it seems it hasn't been replaced yet.
=== For the bureaucrat(s) of this wiki ===
Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting.
You can immediately start working on your wiki or whenever you want.
Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links:
* [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users)
* [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]]
* [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.)
==== I still don't understand X! ====
Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here:
* [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]]
* On [[phab:|Phabricator]]
* On [https://miraheze.org/discord Discord]
* On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat])
=== For visitors of this wiki ===
Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later!
21236ac3f8d65e5563b6da6b70815ca6bf1e6616
MediaWiki:Common.css
8
2
2
2023-10-02T13:02:12Z
WAGRC1
2
Created page with "/* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for..."
css
text/css
/*
* This is the CSS common to all desktop skins on en.Wikipedia.
* Styling inside .mw-parser-output should generally use TemplateStyles.
*/
/* Reset italic styling set by user agent */
cite,
dfn {
font-style: inherit;
}
/* Straight quote marks for <q> */
q {
quotes: '"' '"' "'" "'";
}
/* Avoid collision of blockquote with floating elements by swapping margin and padding */
blockquote {
overflow: hidden;
margin: 1em 0;
padding: 0 40px;
}
/* Consistent size for <small>, <sub> and <sup> */
small {
font-size: 85%;
}
.mw-body-content sub,
.mw-body-content sup {
font-size: 80%;
}
/* Same spacing for indented and unindented paragraphs on talk pages */
.ns-talk .mw-body-content dd {
margin-top: 0.4em;
margin-bottom: 0.4em;
}
/* Reduce page jumps by hiding collapsed/dismissed content */
.client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child),
/* Avoid FOUC/reflows on collapsed elements. */
/* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */
/* TODO: Use :is() selector at some reasonable future when support is good for Most Clients */
/* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > p,
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > table,
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > thead + tbody,
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) tr:not( :first-child ),
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) .mw-collapsible-content,
/* Hide charinsert base for those not using the gadget */
#editpage-specialchars {
display: none;
}
/* Make the list of references smaller
* Keep in sync with Template:Refbegin/styles.css
* And Template:Reflist/styles.css
*/
ol.references {
font-size: 90%;
margin-bottom: 0.5em;
}
/* Cite customizations for Parsoid
* Once everything uses the one true parser these are just customizations
*/
span[ rel="mw:referencedBy" ] {
counter-reset: mw-ref-linkback 0;
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-ref-linkback, lower-alpha );
font-size: 80%;
font-weight: bold;
font-style: italic;
}
a[ rel="mw:referencedBy" ]::before {
font-weight: bold;
content: "^";
}
span[ rel="mw:referencedBy" ]::before {
content: "^ ";
}
.mw-ref > a[data-mw-group=lower-alpha]::after {
content: '[' counter( mw-Ref, lower-alpha ) ']';
}
.mw-ref > a[data-mw-group=upper-alpha]::after {
content: '[' counter( mw-Ref, upper-alpha ) ']';
}
.mw-ref > a[data-mw-group=decimal]::after {
content: '[' counter( mw-Ref, decimal ) ']';
}
.mw-ref > a[data-mw-group=lower-roman]::after {
content: '[' counter( mw-Ref, lower-roman ) ']';
}
.mw-ref > a[data-mw-group=upper-roman]::after {
content: '[' counter( mw-Ref, upper-roman ) ']';
}
.mw-ref > a[data-mw-group=lower-greek]::after {
content: '[' counter( mw-Ref, lower-greek ) ']';
}
/* Styling for jQuery makeCollapsible, matching that of collapseButton */
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
font-weight: normal;
padding-right: 0.2em;
padding-left: 0.2em;
}
.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
/* @noflip */
float: left;
}
/* Lists in wikitable data cells are always left-aligned */
.wikitable td ul,
.wikitable td ol,
.wikitable td dl {
/* @noflip */
text-align: left;
}
/* Change the external link icon to a PDF icon for all PDF files */
.mw-parser-output a[href$=".pdf"].external,
.mw-parser-output a[href*=".pdf?"].external,
.mw-parser-output a[href*=".pdf#"].external,
.mw-parser-output a[href$=".PDF"].external,
.mw-parser-output a[href*=".PDF?"].external,
.mw-parser-output a[href*=".PDF#"].external {
background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right;
/* @noflip */
padding: 8px 18px 8px 0;
}
/* System messages styled similarly to fmbox */
div.mw-warning-with-logexcerpt,
div.mw-lag-warn-high,
div.mw-cascadeprotectedwarning,
div#mw-protect-cascadeon {
clear: both;
margin: 0.2em 0;
border: 1px solid #bb7070;
background-color: #ffdbdb;
padding: 0.25em 0.9em;
box-sizing: border-box;
}
/* default colors for partial block message */
.mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt {
border-color: #fc3;
background-color: #fef6e7;
}
/* Minimum thumb width */
figure[typeof~='mw:File/Thumb'],
figure[typeof~='mw:File/Frame'],
.thumbinner {
min-width: 100px;
}
/* Prevent floating boxes from overlapping any category listings,
file histories, edit previews, and edit [Show changes] views. */
#mw-subcategories,
#mw-pages,
#mw-category-media,
#filehistory,
#wikiPreview,
#wikiDiff {
clear: both;
}
/* Styling for tags in changes pages */
.mw-tag-markers {
font-style: italic;
font-size: 90%;
}
/* Hide stuff meant for accounts with special permissions. Made visible again in
[[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]],
[[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]],
[[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]],
[[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */
.checkuser-show,
.sysop-show,
.abusefilter-show,
.abusefilter-helper-show,
.patroller-show,
.templateeditor-show,
.extendedmover-show,
.extendedconfirmed-show,
.autoconfirmed-show,
.user-show {
display: none;
}
/* Hide the redlink generated by {{Editnotice}},
this overrides the ".sysop-show { display: none; }" above that applies
to the same link as well. See [[phab:T45013]]
Hide the images in editnotices to keep them readable in VE view.
Long term, editnotices should become a core feature so that they can be designed responsive. */
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink,
.ve-ui-mwNoticesPopupTool-item .mbox-image,
.ve-ui-mwNoticesPopupTool-item .mbox-imageright {
display: none !important;
}
/* Remove bullets when there are multiple edit page warnings */
ul.permissions-errors {
margin: 0;
}
ul.permissions-errors > li {
list-style: none;
}
/* larger inline math */
span.mwe-math-mathml-inline {
font-size: 118%;
}
/* Make <math display="block"> be left aligned with one space indent for
* compatibility with style conventions
*/
.mwe-math-fallback-image-display,
.mwe-math-mathml-display {
margin-left: 1.6em !important;
margin-top: 0.6em;
margin-bottom: 0.6em;
}
.mwe-math-mathml-display math {
display: inline;
}
@media screen {
/* Put a chequered background behind images, only visible if they have transparency,
* except on main, user, and portal namespaces
*/
body:not(.ns-0):not(.ns-2):not(.ns-100) .gallerybox .thumb img {
background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat;
}
/* Display "From Wikipedia, the free encyclopedia" in skins that support it,
do not apply to print mode */
#siteSub {
display: block;
}
}
/* Hide FlaggedRevs notice UI when there are no pending changes */
.flaggedrevs_draft_synced,
.flaggedrevs_stable_synced,
/* "Temporary" to remove links in sidebar T255381 */
#t-upload,
/* Hide broken download box on Special:Book pending T285400 */
.mw-special-Book #coll-downloadbox {
display: none;
}
/*
* BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS;
* SEE [[MediaWiki talk:Common.css/to do]]
*/
/* Infobox template style */
.infobox {
border: 1px solid #a2a9b1;
border-spacing: 3px;
background-color: #f8f9fa;
color: black;
/* @noflip */
margin: 0.5em 0 0.5em 1em;
padding: 0.2em;
/* @noflip */
float: right;
/* @noflip */
clear: right;
font-size: 88%;
line-height: 1.5em;
width: 22em;
}
.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox th,
.infobox td {
vertical-align: top;
}
.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox th,
.infobox td {
/* @noflip */
text-align: left;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox caption {
font-size: 125%;
font-weight: bold;
text-align: center;
}
.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox caption {
padding: 0.2em;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
text-align: center;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
/* @noflip */
text-align: right;
}
/* Normal font styling for wikitable row headers with scope="row" tag */
.wikitable.plainrowheaders th[scope=row],
.wikitable.plainrowheaders th[scope=rowgroup] {
font-weight: normal;
/* @noflip */
text-align: left;
}
/* Remove underlines from certain links */
.nounderlines a,
.IPA a:link,
.IPA a:visited {
text-decoration: none !important;
}
/* Prevent line breaks in silly places where desired (nowrap)
and links when we don't want them to (nowraplinks a) */
.nowrap,
.nowraplinks a {
white-space: nowrap;
}
/* But allow wrapping where desired: */
.wrap,
.wraplinks a {
white-space: normal;
}
/* texhtml class for inline math (based on generic times-serif class) */
span.texhtml {
font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif;
font-size: 118%;
line-height: 1;
white-space: nowrap;
/* Force tabular and lining display for texhtml */
-webkit-font-feature-settings: "lnum", "tnum", "kern" 0;
font-feature-settings: "lnum", "tnum", "kern" 0;
font-variant-numeric: lining-nums tabular-nums;
font-kerning: none;
}
span.texhtml span.texhtml {
font-size: 100%;
}
@media screen {
.nochecker .gallerybox .thumb img {
background-image: none;
}
}
/* Put anything you mean to be a sitewide addition above the TemplateStyles
* comment above.
*/
80bc2fb38f8fc6ad12bf35b2d4cdb20245ceb719
Template:Horse (Individual)
10
14
36
2023-10-05T09:13:47Z
WAGRC1
2
Created page with "{{Infobox | name = Example | headerstyle = background:#FFD100 | titlestyle = background:#FFD100 | title = | subheader = |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Example image. | header1 = Overview: | labelstyle = background:lightblue | label2 = Official Name: | data2 = Example | label3 = Previous Name(s): | data3 = Example | label4 = Call Name(s): | data4 = Exam..."
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#FFD100
| titlestyle = background:#FFD100
| title =
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:lightblue
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data21 = Example
| label23 = Height: | data22 = Example
| label24 = Weight: | data23 = Example
| label25 = Girth: | data24 = Example
| label26 = Brand(s): | data25 = Example
| label27 = Misc. Dimensions: | data26 = Example
| header27 = Health:
| label28 = Health issues: | data27 = Example
| label29 = Carrier of: | data28 = Example
| label30 = Designated Vet: | data29 = Example
| label31 = Latest visit: | data30 = Example
| label32 = Medical conditions: | data31 = Example
| label33 = Medication: | data32 = Example
| label34 = Medical reports: | data33 = Example
| header35 = Performance:
| label36 = First Keuring: | data34 = Example
| label37 = Latest Keuring: | data35 = Example
| label38 = Last Keuring: | data36 = Example
| label39 = Predicates: | data37 = Example
| label40 = Ster pct. | data38 = Example
| label41 = Kroon pct. | data39 = Example
| label42 = Other Predicates pct. | data40 = Example
| label43 = Preferents: | data41 = Example
| label44 = Competition awards: | data42 = Example
| label45 = Records held: | data43 = Example
| header46 = Ancestry:
| label47 = Sire: | data44 = Example
| label48 = Dam: | data45 = Example
| label49 = Grand-sires: | data46 = Example
| label50 = Grand-dames: | data47 = Example
| label51 = Total offspring: | data48 = Example
| label52 = Total siblings: | data49 = Example
| label53 = Notable Descendants: | data50 = Example
| label54 = In-breeding: | data51 = Example
| header53 = Additional Information:
| label530 = Other Name(s): | data502 = Example
| label55 = Location: | data510 = Example
| label56 = Register (book): | data52 = Example
| label57 = Book No. | data53 = Example
| label58 = Date of Reg. | data54 = Example
| label59 = Registrar: | data55 = Example
| label60 = Permit: | data56 = Example
| label61 = Stud(s): | data57 = Example
| label62 = Trainer(s): | data58 = Example
| label63 = Microchip No. | data59 = Example
| label64 = Accredited: | data60 = Example
| label65 = Earnings: | data61 = Example
| label66 = Honours: | data62 = Example
| header67 = Misc. Details:
| label68 = Notes: | data63 = Example
|belowstyle = background:#FFD100
|below = Example
}}
c3e9fa658e7d593e015f40c7c5717585b89f6717
37
36
2023-10-05T10:36:12Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title =
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data21 = Example
| label23 = Height: | data22 = Example
| label24 = Weight: | data23 = Example
| label25 = Girth: | data24 = Example
| label26 = Brand(s): | data25 = Example
| label27 = Misc. Dimensions: | data26 = Example
| header27 = Health:
| label28 = Health issues: | data27 = Example
| label29 = Carrier of: | data28 = Example
| label30 = Designated Vet: | data29 = Example
| label31 = Latest visit: | data30 = Example
| label32 = Medical conditions: | data31 = Example
| label33 = Medication: | data32 = Example
| label34 = Medical reports (links): | data33 = Example
| header35 = Performance:
| label36 = First Keuring: | data34 = Example
| label37 = Latest Keuring: | data35 = Example
| label38 = Last Keuring: | data36 = Example
| label39 = Predicates: | data37 = Example
| label40 = Ster pct. | data38 = Example
| label41 = Kroon pct. | data39 = Example
| label42 = Other Predicates pct. | data40 = Example
| label43 = Preferents: | data41 = Example
| label44 = Competition awards: | data42 = Example
| label45 = Records held: | data43 = Example
| header46 = Ancestry:
| label47 = Sire: | data44 = Example
| label48 = Dam: | data45 = Example
| label49 = Grand-sires: | data46 = Example
| label50 = Grand-dames: | data47 = Example
| label51 = Total offspring: | data48 = Example
| label52 = Total siblings: | data49 = Example
| label53 = Notable Descendants: | data50 = Example
| label54 = In-breeding: | data51 = Example
| header55 = Additional Information:
| label56 = Other Name(s): | data52 = Example
| label57 = Location: | data53 = Example
| label58 = Register (book): | data54 = Example
| label59 = Book No. | data55 = Example
| label60 = Date of Reg. | data56 = Example
| label61 = Registrar: | data57 = Example
| label62 = Permit: | data58 = Example
| label63 = Stud(s): | data59 = Example
| label64 = Trainer(s): | data60 = Example
| label65 = Microchip No. | data61 = Example
| label66 = Accredited: | data62 = Example
| label67 = Earnings: | data63 = Example
| label68 = Honours: | data64 = Example
| header69 = Misc. Details:
| label70 = Notes: | data70 = Example
|belowstyle = background:##d0a404
|below = Example
}}
026b173214000ad89c374012fe0e6dc4d2531cc2
38
37
2023-10-05T10:49:11Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title =
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data21 = Example
| label23 = Height: | data22 = Example
| label24 = Weight: | data23 = Example
| label25 = Girth: | data24 = Example
| label26 = Brand(s): | data25 = Example
| label27 = Misc. Dimensions: | data26 = Example
| header28 = Health:
| label29 = Health issues: | data27 = Example
| label30 = Carrier of: | data28 = Example
| label31 = Designated Vet: | data29 = Example
| label32 = Latest visit: | data30 = Example
| label33 = Medical conditions: | data31 = Example
| label34 = Medication: | data32 = Example
| label35 = Medical reports (links): | data33 = Example
| header36 = Performance:
| label37 = First Keuring: | data34 = Example
| label38 = Latest Keuring: | data35 = Example
| label39 = Last Keuring: | data36 = Example
| label40 = Predicates: | data37 = Example
| label41 = Ster pct. | data38 = Example
| label42 = Kroon pct. | data39 = Example
| label43 = Other Predicates pct. | data40 = Example
| label44 = Preferents: | data41 = Example
| label45 = Competition awards: | data42 = Example
| label46 = Records held: | data43 = Example
| header47 = Ancestry:
| label48 = Sire: | data44 = Example
| label49 = Dam: | data45 = Example
| label50 = Grand-sires: | data46 = Example
| label51 = Grand-dames: | data47 = Example
| label52 = Total offspring: | data48 = Example
| label53 = Total siblings: | data49 = Example
| label54 = Notable Descendants: | data50 = Example
| label55 = In-breeding: | data51 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data52 = Example
| label58 = Location: | data53 = Example
| label59 = Register (book): | data54 = Example
| label60 = Book No. | data55 = Example
| label61 = Date of Reg. | data56 = Example
| label62 = Registrar: | data57 = Example
| label63 = Permit: | data58 = Example
| label64 = Stud(s): | data59 = Example
| label65 = Trainer(s): | data60 = Example
| label66 = Microchip No. | data61 = Example
| label67 = Accredited: | data62 = Example
| label68 = Earnings: | data63 = Example
| label69 = Honours: | data64 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
f6f07961a962c13dfc296af155f9ecd7e8c9d7ca
39
38
2023-10-05T10:55:45Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title =
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
7b2680a7e2d170f523be966d5a3521a3d83a92c2
40
39
2023-10-05T10:57:17Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
40d19dc3d09e90bf13b43241076c1681bcae2428
43
40
2023-10-05T13:48:42Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
<noinclude>{{Documentation}}</noinclude>
894d11b943299bbe35d69de0270d1e50e489ef0a
Template:Horse (Individual)/doc
10
15
41
2023-10-05T13:38:56Z
WAGRC1
2
Created page with "<pre style="float:left; max-width: 50%;"> {{Horse (Individual) |title = |image = |caption = |Official Name: = |Previous Name(s): = |Call Name(s): = |Sex: = |Gender: = |Line: = |Status: = |Condition: = |Main Discipline: = |Other Disciplines: = |Foaled: = |Place of Birth: = |Breeder(s): = |First Owner: = |Current Owner: = |Last Owner: = |Date of Death: = |Place of Death: = |Registrations: = |Coat Colour: = |Height: = |Weight: = |Girth: = |Brand(s): = |Misc. Dimensions: = |..."
wikitext
text/x-wiki
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
</pre>
be620ba89487b18c50147aaea73af21cd091d8db
42
41
2023-10-05T13:39:17Z
WAGRC1
2
wikitext
text/x-wiki
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
596b32e1c870d220ed9ee964614783514e1f66be
44
42
2023-10-05T13:49:18Z
WAGRC1
2
wikitext
text/x-wiki
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
e2b32c2c4609ab20675effa77a3a94d88779d982
45
44
2023-10-05T13:52:02Z
WAGRC1
2
wikitext
text/x-wiki
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
=== Example: ===
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
8aecc6951e1c160fd6d0dee433c23d7388f0336a
46
45
2023-10-05T13:58:58Z
WAGRC1
2
wikitext
text/x-wiki
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
=== Example: ===
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
d8593fe56f270a67709095f53dbd600cb8dc07d6
47
46
2023-10-05T14:00:20Z
WAGRC1
2
wikitext
text/x-wiki
<br>
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
=== Example: ===
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
52b3e38b106dd79268dcabefcdce622c9b29a3f2
48
47
2023-10-05T14:01:01Z
WAGRC1
2
wikitext
text/x-wiki
== Documentation: ==
<br>
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
=== Example: ===
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
4551484a854243a57f78b475a3ffb4c10e39ea75
49
48
2023-10-05T14:01:44Z
WAGRC1
2
/* Documentation: */
wikitext
text/x-wiki
== Documentation: ==
{{Documentation}}
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
=== Example: ===
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
13333233468ef68c1c682df299948c908ecb4f48
50
49
2023-10-05T14:02:57Z
WAGRC1
2
wikitext
text/x-wiki
== Documentation: ==
== Syntax: ==
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
40b1f9ba3bd5865583e144b71a95552bd482d2a7
Template:Horse (Individual)/doc
10
15
51
50
2023-10-05T14:04:26Z
WAGRC1
2
wikitext
text/x-wiki
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
982585951524f5168c8c5e0e5bf170b95e45a707
53
51
2023-10-05T14:19:17Z
WAGRC1
2
wikitext
text/x-wiki
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name: =
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
82d889f87a22d00778addb4725fe7c55b787e0fb
55
53
2023-10-06T12:06:01Z
WAGRC1
2
wikitext
text/x-wiki
<div style="float:left;">
{{Infobox
| name = Example
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = Example
| subheader =
|imagestyle =
|captionstyle =
|image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
|caption = Example image.
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = Example
| label3 = Previous Name(s): | data3 = Example
| label4 = Call Name(s): | data4 = Example
| label5 = Sex: | data5 = Example
| label6 = Gender: | data6 = Example
| label7 = Line: | data7 = Example
| label8 = Status: | data8 = Example
| label9 = Condition: | data9 = Example
| label10 = Main Discipline: | data10 = Example
| label11 = Other Disciplines: | data11 = Example
| label12 = Foaled: | data12 = Example
| label13 = Place of Birth: | data13 = Example
| label14 = Breeder(s): | data14 = Example
| label15 = First Owner: | data15 = Example
| label16 = Current Owner: | data16 = Example
| label17 = Last Owner: | data17 = Example
| label18 = Date of Death: | data18 = Example
| label19 = Place of Death: | data19 = Example
| label20 = Registrations: | data20 = Example
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = Example
| label23 = Height: | data23 = Example
| label24 = Weight: | data24 = Example
| label25 = Girth: | data25 = Example
| label26 = Brand(s): | data26 = Example
| label27 = Misc. Dimensions: | data27 = Example
| header28 = Health:
| label29 = Health issues: | data29 = Example
| label30 = Carrier of: | data30 = Example
| label31 = Designated Vet: | data31 = Example
| label32 = Latest visit: | data32 = Example
| label33 = Medical conditions: | data33 = Example
| label34 = Medication: | data34 = Example
| label35 = Medical reports (links): | data35 = Example
| header36 = Performance:
| label37 = First Keuring: | data37 = Example
| label38 = Latest Keuring: | data38 = Example
| label39 = Last Keuring: | data39 = Example
| label40 = Predicates: | data40 = Example
| label41 = Ster pct. | data41 = Example
| label42 = Kroon pct. | data42 = Example
| label43 = Other Predicates pct. | data43 = Example
| label44 = Preferents: | data44 = Example
| label45 = Competition awards: | data45 = Example
| label46 = Records held: | data46 = Example
| header47 = Ancestry:
| label48 = Sire: | data48 = Example
| label49 = Dam: | data49 = Example
| label50 = Grand-sires: | data50 = Example
| label51 = Grand-dames: | data51 = Example
| label52 = Total offspring: | data52 = Example
| label53 = Total siblings: | data53 = Example
| label54 = Notable Descendants: | data54 = Example
| label55 = In-breeding: | data55 = Example
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = Example
| label58 = Location: | data58 = Example
| label59 = Register (book): | data59 = Example
| label60 = Book No. | data60 = Example
| label61 = Date of Reg. | data61 = Example
| label62 = Registrar: | data62 = Example
| label63 = Permit: | data63 = Example
| label64 = Stud(s): | data64 = Example
| label65 = Trainer(s): | data65 = Example
| label66 = Microchip No. | data66 = Example
| label67 = Accredited: | data67 = Example
| label68 = Earnings: | data68 = Example
| label69 = Honours: | data69 = Example
| header70 = Misc. Details:
| label71 = Notes: | data71 = Example
|belowstyle = background:##d0a404
|below = Example
}}
<pre style="float:left; max-width: 60%;">
{{Horse (Individual)
|title = {{{title|}}}
|image =
|caption = {{{caption|}}}
<!-- Overview -->
|Official Name: = {{{official_name|}}}
|Previous Name(s): = {{{previous_names|}}}
|Call Name(s): = {{{call_names|}}}
|Sex: = {{{sex|}}}
|Gender: = {{{gender|}}}
|Line: = {{{line|}}}
|Status: = {{{status|}}}
|Condition: = {{{condition|}}}
|Main Discipline: = {{{main_discipline|}}}
|Other Disciplines: = {{{other_disciplines|}}}
|Foaled: = {{{foaled|}}}
|Place of Birth: = {{{place_of_birth|}}}
|Breeder(s): = {{{breeders|}}}
|First Owner: = {{{first_owner|}}}
|Current Owner: = {{{current_owner|}}}
|Last Owner: = {{{last_owner|}}}
|Date of Death: = {{{date_of_death|}}}
|Place of Death: = {{{place_of_death|}}}
|Registrations: = {{{registrations|}}}
<!-- Physical Characteristics -->
|Coat Colour: = {{{coat_colour|}}}
|Height: = {{{height|}}}
|Weight: = {{{weight|}}}
|Girth: = {{{girth|}}}
|Brand(s): = {{{brand|}}}
|Misc. Dimensions: = {{{misc_dimensions|}}}
<!-- Health -->
|Health issues: = {{{health_issues|}}}
|Carrier of: = {{{carrier_of|}}}
|Designated Vet: = {{{designated_vet|}}}
|Latest visit: = {{{latest_visit|}}}
|Medical conditions: = {{{medical_conditions|}}}
|Medication: = {{{medication|}}}
|Medical reports (links): = {{{medical_reports|}}}
<!-- Performance -->
|First Keuring: = {{{first_keuring|}}}
|Latest Keuring: = {{{latest_keuring|}}}
|Last Keuring: = {{{last_keuring|}}}
|Predicates: = {{{predicates|}}}
|Ster pct. = {{{ster_percentage|}}}
|Kroon pct. = {{{kroon_percentage|}}}
|Other Predicates pct. = {{{other_predicates_percentage|}}}
|Preferents: = {{{preferents|}}}
|Competition awards: = {{{competition_awards|}}}
|Records held: = {{{records_held|}}}
<!-- Ancestry -->
|Sire: = {{{sire|}}}
|Dam: = {{{dam|}}}
|Grand-sires: = {{{grand-sires|}}}
|Grand-dames: = {{{grand-dames|}}}
|Total offspring: = {{{total_offspring|}}}
|Total siblings: = {{{total_siblings|}}}
|Notable Descendants: = {{{notable_descendants|}}}
|In-breeding: = {{{in-breeding|}}}
<!-- Additional Information -->
|Other Name(s): = {{{other_names|}}}
|Location: = {{{location|}}}
|Register (book): = {{{register_(book)|}}}
|Book No. = {{{Studbook_Number|}}}
|Date of Reg. = {{{registration_date|}}}
|Registrar: = {{{registrar|}}}
|Permit: = {{{permit|}}}
|Stud(s): = {{{stud|}}}
|Trainer(s): = {{{trainers|}}}
|Microchip No. = {{{microchip_number|}}}
|Accredited: = {{{accredited|}}}
|Earnings: = {{{earnings|}}}
|Honours: = {{{honours|}}}
<!-- Misc. Details -->
|Notes: = {{{notes|}}}
|below = {{{below_text|}}}
}}
</pre>
<pre style="float:left; max-width: 50%;">
{{Horse (Individual)
|title =
|image =
|caption =
|Official Name:=
|Previous Name(s): =
|Call Name(s): =
|Sex: =
|Gender: =
|Line: =
|Status: =
|Condition: =
|Main Discipline: =
|Other Disciplines: =
|Foaled: =
|Place of Birth: =
|Breeder(s): =
|First Owner: =
|Current Owner: =
|Last Owner: =
|Date of Death: =
|Place of Death: =
|Registrations: =
|Coat Colour: =
|Height: =
|Weight: =
|Girth: =
|Brand(s): =
|Misc. Dimensions: =
|Health issues: =
|Carrier of: =
|Designated Vet: =
|Latest visit: =
|Medical conditions: =
|Medication: =
|Medical reports (links): =
|First Keuring: =
|Latest Keuring: =
|Last Keuring: =
|Predicates: =
|Ster pct. =
|Kroon pct. =
|Other Predicates pct. =
|Preferents: =
|Competition awards: =
|Records held: =
|Sire: =
|Dam: =
|Grand-sires: =
|Grand-dames: =
|Total offspring: =
|Total siblings: =
|Notable Descendants: =
|In-breeding: =
|Other Name(s): =
|Location: =
|Register (book): =
|Book No. =
|Date of Reg. =
|Registrar: =
|Permit: =
|Stud(s): =
|Trainer(s): =
|Microchip No. =
|Accredited: =
|Earnings: =
|Honours: =
|Notes: =
|below =
}}
</pre>
360bce5d8cce8676d78673573e60e839689a2a90
58
55
2023-10-07T14:34:22Z
WAGRC1
2
wikitext
text/x-wiki
<div style="float:left;">
<pre>
{{Horse (Individual)
| title = Title
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
| caption = Example image.
| official_name = Example
| previous_names = Example
| call_names = Example
| sex = Example
| gender = Example
| line = Example
| status = Example
| condition = Example
| main_discipline = Example
| other_disciplines = Example
| foaled = Example
| place_of_birth = Example
| breeders = Example
| first_owner = Example
| current_owner = Example
| last_owner = Example
| date_of_death = Example
| place_of_death = Example
| registrations = Example
| coat_colour = Example
| height = Example
| weight = Example
| girth = Example
| brand = Example
| misc_dimensions = Example
| health_issues = Example
| carrier_of = Example
| designated_vet = Example
| latest_visit = Example
| medical_conditions = Example
| medication = Example
| medical_reports = Example
| first_keuring = Example
| latest_keuring = Example
| last_keuring = Example
| predicates = Example
| ster_percentage = Example
| kroon_percentage = Example
| other_predicates_percentage = Example
| preferents = Example
| competition_awards = Example
| records_held = Example
| sire = Example
| dam = Example
| grand-sires = Example
| grand-dames = Example
| total_offspring = Example
| total_siblings = Example
| notable_descendants = Example
| in-breeding = Example
| other_names = Example
| location = Example
| register_(book) = Example
| studbook_number = Example
| registration_date = Example
| registrar = Example
| permit = Example
| stud = Example
| trainers = Example
| microchip_number = Example
| accredited = Example
| earnings = Example
| honours = Example
| notes = Example
| below_text = Example
}}
</pre>
d53ea7a2d16bec021a2fd8cc3109b102ae808a0d
Template:Horse (Individual)
10
14
52
43
2023-10-05T14:05:37Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name =
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title =
| subheader =
|imagestyle =
|captionstyle =
|image =
|caption =
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 =
| label3 = Previous Name(s): | data3 =
| label4 = Call Name(s): | data4 =
| label5 = Sex: | data5 =
| label6 = Gender: | data6 =
| label7 = Line: | data7 =
| label8 = Status: | data8 =
| label9 = Condition: | data9 =
| label10 = Main Discipline: | data10 =
| label11 = Other Disciplines: | data11 =
| label12 = Foaled: | data12 =
| label13 = Place of Birth: | data13 =
| label14 = Breeder(s): | data14 =
| label15 = First Owner: | data15 =
| label16 = Current Owner: | data16 =
| label17 = Last Owner: | data17 =
| label18 = Date of Death: | data18 =
| label19 = Place of Death: | data19 =
| label20 = Registrations: | data20 =
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 =
| label23 = Height: | data23 =
| label24 = Weight: | data24 =
| label25 = Girth: | data25 =
| label26 = Brand(s): | data26 =
| label27 = Misc. Dimensions: | data27 =
| header28 = Health:
| label29 = Health issues: | data29 =
| label30 = Carrier of: | data30 =
| label31 = Designated Vet: | data31 =
| label32 = Latest visit: | data32 =
| label33 = Medical conditions: | data33 =
| label34 = Medication: | data34 =
| label35 = Medical reports (links): | data35 =
| header36 = Performance:
| label37 = First Keuring: | data37 =
| label38 = Latest Keuring: | data38 =
| label39 = Last Keuring: | data39 =
| label40 = Predicates: | data40 =
| label41 = Ster pct. | data41 =
| label42 = Kroon pct. | data42 =
| label43 = Other Predicates pct. | data43 =
| label44 = Preferents: | data44 =
| label45 = Competition awards: | data45 =
| label46 = Records held: | data46 =
| header47 = Ancestry:
| label48 = Sire: | data48 =
| label49 = Dam: | data49 =
| label50 = Grand-sires: | data50 =
| label51 = Grand-dames: | data51 =
| label52 = Total offspring: | data52 =
| label53 = Total siblings: | data53 =
| label54 = Notable Descendants: | data54 =
| label55 = In-breeding: | data55 =
| header56 = Additional Information:
| label57 = Other Name(s): | data57 =
| label58 = Location: | data58 =
| label59 = Register (book): | data59 =
| label60 = Book No. | data60 =
| label61 = Date of Reg. | data61 =
| label62 = Registrar: | data62 =
| label63 = Permit: | data63 =
| label64 = Stud(s): | data64 =
| label65 = Trainer(s): | data65 =
| label66 = Microchip No. | data66 =
| label67 = Accredited: | data67 =
| label68 = Earnings: | data68 =
| label69 = Honours: | data69 =
| header70 = Misc. Details:
| label71 = Notes: | data71 =
|belowstyle = background:##d0a404
|below =
}}
<noinclude>{{Documentation}}</noinclude>
95bd490da09a57b398a8276517dd583181341616
54
52
2023-10-06T05:34:56Z
WAGRC1
2
wikitext
text/x-wiki
{{Infobox
| name =
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = {{{title|}}}
| subheader =
|imagestyle =
|captionstyle =
|image =
|caption = {{{caption|}}}
| header1 = Overview:
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = {{{official_name|}}}
| label3 = Previous Name(s): | data3 = {{{previous_names|}}}
| label4 = Call Name(s): | data4 = {{{call_names|}}}
| label5 = Sex: | data5 = {{{sex|}}}
| label6 = Gender: | data6 = {{{gender|}}}
| label7 = Line: | data7 = {{{line|}}}
| label8 = Status: | data8 = {{{status|}}}
| label9 = Condition: | data9 = {{{condition|}}}
| label10 = Main Discipline: | data10 = {{{main_discipline|}}}
| label11 = Other Disciplines: | data11 = {{{other_disciplines|}}}
| label12 = Foaled: | data12 = {{{foaled|}}}
| label13 = Place of Birth: | data13 = {{{place_of_birth|}}}
| label14 = Breeder(s): | data14 = {{{breeders|}}}
| label15 = First Owner: | data15 = {{{first_owner|}}}
| label16 = Current Owner: | data16 = {{{current_owner|}}}
| label17 = Last Owner: | data17 = {{{last_owner|}}}
| label18 = Date of Death: | data18 = {{{date_of_death|}}}
| label19 = Place of Death: | data19 = {{{place_of_death|}}}
| label20 = Registrations: | data20 = {{{registrations|}}}
| header21 = Physical Characteristics:
| label22 = Coat Colour: | data22 = {{{coat_colour|}}}
| label23 = Height: | data23 = {{{height|}}}
| label24 = Weight: | data24 = {{{weight|}}}
| label25 = Girth: | data25 = {{{girth|}}}
| label26 = Brand(s): | data26 = {{{brand|}}}
| label27 = Misc. Dimensions: | data27 = {{{misc_dimensions|}}}
| header28 = Health:
| label29 = Health issues: | data29 = {{{health_issues|}}}
| label30 = Carrier of: | data30 = {{{carrier_of|}}}
| label31 = Designated Vet: | data31 = {{{designated_vet|}}}
| label32 = Latest visit: | data32 = {{{latest_visit|}}}
| label33 = Medical conditions: | data33 = {{{medical_conditions|}}}
| label34 = Medication: | data34 = {{{medication|}}}
| label35 = Medical reports (links): | data35 = {{{medical_reports|}}}
| header36 = Performance:
| label37 = First Keuring: | data37 = {{{first_keuring|}}}
| label38 = Latest Keuring: | data38 = {{{latest_keuring|}}}
| label39 = Last Keuring: | data39 = {{{last_keuring|}}}
| label40 = Predicates: | data40 = {{{predicates|}}}
| label41 = Ster pct. | data41 = {{{ster_percentage|}}}
| label42 = Kroon pct. | data42 = {{{kroon_percentage|}}}
| label43 = Other Predicates pct. | data43 = {{{other_predicates_percentage|}}}
| label44 = Preferents: | data44 = {{{preferents|}}}
| label45 = Competition awards: | data45 = {{{competition_awards|}}}
| label46 = Records held: | data46 = {{{records_held|}}}
| header47 = Ancestry:
| label48 = Sire: | data48 = {{{sire|}}}
| label49 = Dam: | data49 = {{{dam|}}}
| label50 = Grand-sires: | data50 = {{{grand-sires|}}}
| label51 = Grand-dames: | data51 = {{{grand-dames|}}}
| label52 = Total offspring: | data52 = {{{total_offspring|}}}
| label53 = Total siblings: | data53 = {{{total_siblings|}}}
| label54 = Notable Descendants: | data54 = {{{notable_descendants|}}}
| label55 = In-breeding: | data55 = {{{in-breeding|}}}
| header56 = Additional Information:
| label57 = Other Name(s): | data57 = {{{other_names|}}}
| label58 = Location: | data58 = {{{location|}}}
| label59 = Register (book): | data59 = {{{register_(book)|}}}
| label60 = Book No. | data60 = {{{Studbook_Number|}}}
| label61 = Date of Reg. | data61 = {{{registration_date|}}}
| label62 = Registrar: | data62 = {{{registrar|}}}
| label63 = Permit: | data63 = {{{permit|}}}
| label64 = Stud(s): | data64 = {{{stud|}}}
| label65 = Trainer(s): | data65 = {{{trainers|}}}
| label66 = Microchip No. | data66 = {{{microchip_number|}}}
| label67 = Accredited: | data67 = {{{accredited|}}}
| label68 = Earnings: | data68 = {{{earnings|}}}
| label69 = Honours: | data69 = {{{honours|}}}
| header70 = Misc. Details:
| label71 = Notes: | data71 = {{{notes|}}}
|belowstyle = background:##d0a404
|below = {{{below_text|}}}
}}
<noinclude>{{Documentation}}</noinclude>
cc70def5be12ae7e36532c08c4b97ed07ad05d4b
57
54
2023-10-07T14:09:15Z
WAGRC1
2
wikitext
text/x-wiki
<includeonly>{{Infobox
| name =
| headerstyle = background:#d0a404
| titlestyle = background:#d0a404
| title = {{{title|}}}
| subheader =
| imagestyle =
| captionstyle =
| image = {{{image|}}}
| caption = {{{caption|}}}
| header1 = {{#if:{{{official_name|}}}{{{previous_names|}}}{{{call_names|}}}{{{sex|}}}{{{gender|}}}{{{line|}}}{{{status|}}}{{{condition|}}}{{{main_discipline|}}}{{{other_disciplines|}}}{{{foaled|}}}{{{place_of_birth|}}}{{{breeders|}}}{{{first_owner|}}}{{{current_owner|}}}{{{last_owner|}}}{{{date_of_death|}}}{{{place_of_death|}}}{{{registrations|}}}|Overview:}}
| labelstyle = background:#007DC3
| label2 = Official Name: | data2 = {{{official_name|}}}
| label3 = Previous Name(s): | data3 = {{{previous_names|}}}
| label4 = Call Name(s): | data4 = {{{call_names|}}}
| label5 = Sex: | data5 = {{{sex|}}}
| label6 = Gender: | data6 = {{{gender|}}}
| label7 = Line: | data7 = {{{line|}}}
| label8 = Status: | data8 = {{{status|}}}
| label9 = Condition: | data9 = {{{condition|}}}
| label10 = Main Discipline: | data10 = {{{main_discipline|}}}
| label11 = Other Disciplines: | data11 = {{{other_disciplines|}}}
| label12 = Foaled: | data12 = {{{foaled|}}}
| label13 = Place of Birth: | data13 = {{{place_of_birth|}}}
| label14 = Breeder(s): | data14 = {{{breeders|}}}
| label15 = First Owner: | data15 = {{{first_owner|}}}
| label16 = Current Owner: | data16 = {{{current_owner|}}}
| label17 = Last Owner: | data17 = {{{last_owner|}}}
| label18 = Date of Death: | data18 = {{{date_of_death|}}}
| label19 = Place of Death: | data19 = {{{place_of_death|}}}
| label20 = Registrations: | data20 = {{{registrations|}}}
| header21 = {{#if:{{{coat_colour|}}}{{{height|}}}{{{weight|}}}{{{girth|}}}{{{brand|}}}{{{misc_dimensions|}}}|Physical Characteristics:}}
| label22 = Coat Colour: | data22 = {{{coat_colour|}}}
| label23 = Height: | data23 = {{{height|}}}
| label24 = Weight: | data24 = {{{weight|}}}
| label25 = Girth: | data25 = {{{girth|}}}
| label26 = Brand(s): | data26 = {{{brand|}}}
| label27 = Misc. Dimensions: | data27 = {{{misc_dimensions|}}}
| header28 = {{#if:{{{health_issues|}}}{{{carrier_of|}}}{{{designated_vet|}}}{{{latest_visit|}}}{{{medical_conditions|}}}{{{medication|}}}{{{medical_reports|}}}|Health:}}
| label29 = Health issues: | data29 = {{{health_issues|}}}
| label30 = Carrier of: | data30 = {{{carrier_of|}}}
| label31 = Designated Vet: | data31 = {{{designated_vet|}}}
| label32 = Latest visit: | data32 = {{{latest_visit|}}}
| label33 = Medical conditions: | data33 = {{{medical_conditions|}}}
| label34 = Medication: | data34 = {{{medication|}}}
| label35 = Medical reports (links): | data35 = {{{medical_reports|}}}
| header36 = {{#if:{{{first_keuring|}}}{{{latest_keuring|}}}{{{last_keuring|}}}{{{predicates|}}}{{{ster_percentage|}}}{{{kroon_percentage|}}}{{{other_predicates_percentage|}}}{{{preferents|}}}{{{competition_awards|}}}{{{records_held|}}}|Performance:}}
| label37 = First Keuring: | data37 = {{{first_keuring|}}}
| label38 = Latest Keuring: | data38 = {{{latest_keuring|}}}
| label39 = Last Keuring: | data39 = {{{last_keuring|}}}
| label40 = Predicates: | data40 = {{{predicates|}}}
| label41 = Ster pct. | data41 = {{{ster_percentage|}}}
| label42 = Kroon pct. | data42 = {{{kroon_percentage|}}}
| label43 = Other Predicates pct. | data43 = {{{other_predicates_percentage|}}}
| label44 = Preferents: | data44 = {{{preferents|}}}
| label45 = Competition awards: | data45 = {{{competition_awards|}}}
| label46 = Records held: | data46 = {{{records_held|}}}
| header47 = {{#if:{{{sire|}}}{{{dam|}}}{{{grand-sires|}}}{{{grand-dames|}}}{{{total_offspring|}}}{{{total_siblings|}}}{{{notable_descendants|}}}{{{in-breeding|}}}|Ancestry:}}
| label48 = Sire: | data48 = {{{sire|}}}
| label49 = Dam: | data49 = {{{dam|}}}
| label50 = Grand-sires: | data50 = {{{grand-sires|}}}
| label51 = Grand-dames: | data51 = {{{grand-dames|}}}
| label52 = Total offspring: | data52 = {{{total_offspring|}}}
| label53 = Total siblings: | data53 = {{{total_siblings|}}}
| label54 = Notable Descendants: | data54 = {{{notable_descendants|}}}
| label55 = In-breeding: | data55 = {{{in-breeding|}}}
| header56 = {{#if:{{{other_names|}}}{{{location|}}}{{{register_(book)|}}}{{{Studbook_Number|}}}{{{registration_date|}}}{{{registrar|}}}{{{permit|}}}{{{stud|}}}{{{trainers|}}}{{{microchip_number|}}}{{{accredited|}}}{{{earnings|}}}{{{honours|}}}|Additional Information:}}
| label57 = Other Name(s): | data57 = {{{other_names|}}}
| label58 = Location: | data58 = {{{location|}}}
| label59 = Register (book): | data59 = {{{register_(book)|}}}
| label60 = Book No. | data60 = {{{studbook_number|}}}
| label61 = Date of Reg. | data61 = {{{registration_date|}}}
| label62 = Registrar: | data62 = {{{registrar|}}}
| label63 = Permit: | data63 = {{{permit|}}}
| label64 = Stud(s): | data64 = {{{stud|}}}
| label65 = Trainer(s): | data65 = {{{trainers|}}}
| label66 = Microchip No. | data66 = {{{microchip_number|}}}
| label67 = Accredited: | data67 = {{{accredited|}}}
| label68 = Earnings: | data68 = {{{earnings|}}}
| label69 = Honours: | data69 = {{{honours|}}}
| header70 = {{#if:{{{notes|}}}{{{below_text|}}}|Misc. Details:}}
| label71 = Notes: | data71 = {{{notes|}}}
|belowstyle = background:##d0a404
|below = {{{below_text|}}}
}}</includeonly><noinclude>{{Documentation}}</noinclude>
c7f73854ca2d8144c91e6a96bf87fda7e068d7ba
Template:Infobox Test/Horse (Individual)
10
16
56
2023-10-07T11:13:21Z
WAGRC1
2
Infobox created with infobox builder.
wikitext
text/x-wiki
<infobox>
<title source="title">
<default>{{PAGENAME}}</default>
</title>
<image source="image"/>
<data source="data1">
<label>Official Name:</label>
</data>
<data source="data2">
<label>Previous Name(s):</label>
</data>
<data source="data3">
<label>Call Name(s):</label>
</data>
<data source="data4">
<label>Sex:</label>
</data>
<data source="data5">
<label>Gender:</label>
</data>
<data source="data6">
<label>Line:</label>
</data>
<data source="data7">
<label>Status:</label>
</data>
<data source="data8">
<label>Condition:</label>
</data>
<data source="data9">
<label>Main Discipline:</label>
</data>
<data source="data10">
<label>Other Disciplines:</label>
</data>
<data source="data12">
<label>Foaled:</label>
</data>
<data source="data13">
<label>Place of Birth:</label>
</data>
<data source="data14">
<label>Breeder(s):</label>
</data>
<data source="data15">
<label>First Owner:</label>
</data>
<data source="data16">
<label>Current Owner:</label>
</data>
<data source="data17">
<label>Last Owner:</label>
</data>
<data source="data18">
<label>Date of Death:</label>
</data>
<data source="data19">
<label>Place of Death:</label>
</data>
<data source="data20">
<label>Registrations:</label>
</data>
<data source="data21">
<label>Coat Colour:</label>
</data>
<data source="data22">
<label>Height:</label>
</data>
<data source="data23">
<label>Weight:</label>
</data>
<data source="data24">
<label>Girth:</label>
</data>
<data source="data25">
<label>Brand(s):</label>
</data>
<data source="data26">
<label>Misc. Dimensions:</label>
</data>
<data source="data27">
<label>Health issues:</label>
</data>
<data source="data28">
<label>Carrier of:</label>
</data>
<data source="data29">
<label>Designated Vet:</label>
</data>
<data source="data30">
<label>Latest visit:</label>
</data>
<data source="data31">
<label>Medical conditions:</label>
</data>
<data source="data32">
<label>Medication:</label>
</data>
<data source="data33">
<label>Medical reports (links):</label>
</data>
<data source="data34">
<label>First Keuring:</label>
</data>
<data source="data35">
<label>Latest Keuring:</label>
</data>
<data source="data36">
<label>Last Keuring:</label>
</data>
<data source="data37">
<label>Predicates:</label>
</data>
<data source="data38">
<label>Ster pct.</label>
</data>
<data source="data39">
<label>Kroon pct.</label>
</data>
<data source="data40">
<label>Other Predicates pct.</label>
</data>
<data source="data41">
<label>Preferents:</label>
</data>
<data source="data42">
<label>Competition awards:</label>
</data>
<data source="data43">
<label>Records held:</label>
</data>
<data source="data44">
<label>Sire:</label>
</data>
<data source="data45">
<label>Dam:</label>
</data>
<data source="data46">
<label>Grand-sires:</label>
</data>
<data source="data47">
<label>Grand-dams:</label>
</data>
<data source="data48">
<label>Total offspring:</label>
</data>
<data source="data49">
<label>Total siblings:</label>
</data>
<data source="data50">
<label>Notable Descendants:</label>
</data>
<data source="data51">
<label>In-breeding:</label>
</data>
<data source="data52">
<label>Other Name(s):</label>
</data>
<data source="data53">
<label>Location:</label>
</data>
<data source="data54">
<label>Register (book):</label>
</data>
<data source="data55">
<label>Book No.</label>
</data>
<data source="data56">
<label>Date of Reg.</label>
</data>
<data source="data57">
<label>Registrar:</label>
</data>
<data source="data58">
<label>Permit:</label>
</data>
<data source="data59">
<label>Stud(s):</label>
</data>
<data source="data60">
<label>Trainer(s):</label>
</data>
<data source="data61">
<label>Microchip No.</label>
</data>
<data source="data62">
<label>Accredited:</label>
</data>
<data source="data63">
<label>Earnings:</label>
</data>
<data source="data64">
<label>Honours:</label>
</data>
<data source="data65">
<label>Notes:</label>
</data>
</infobox>
44e3f3f4e5c2d9b06b195c36c183e70f99bc761d
Template:Pedigree
10
17
59
2023-10-07T14:39:25Z
WAGRC1
2
Created page with "{| class="wikitable" style="clear:both; margin:0em auto; width:90%;" |+ style="padding-bottom:0.4em;"| Pedigree of {{{name}}} |- !rowspan="8"|Sire<br />{{{f}}} |rowspan="4"|{{{ff}}} |rowspan="2"|{{{fff}}} |{{{ffff}}} |- |{{{fffm}}} |- |rowspan="2"|{{{ffm}}} |{{{ffmf}}} |- |{{{ffmm}}} |- |rowspan="4"|{{{fm}}} |rowspan="2"|{{{fmf}}} |{{{fmff}}} |- |{{{fmfm}}} |- |rowspan="2"|{{{fmm}}} |{{{fmmf}}} |- |{{{fmmm}}} |- !rowspan="8"|Dam<br />{{{m}}} |rowspan="4"|{{{mf}}} |rowspa..."
wikitext
text/x-wiki
{| class="wikitable" style="clear:both; margin:0em auto; width:90%;"
|+ style="padding-bottom:0.4em;"| Pedigree of {{{name}}}
|-
!rowspan="8"|Sire<br />{{{f}}}
|rowspan="4"|{{{ff}}}
|rowspan="2"|{{{fff}}}
|{{{ffff}}}
|-
|{{{fffm}}}
|-
|rowspan="2"|{{{ffm}}}
|{{{ffmf}}}
|-
|{{{ffmm}}}
|-
|rowspan="4"|{{{fm}}}
|rowspan="2"|{{{fmf}}}
|{{{fmff}}}
|-
|{{{fmfm}}}
|-
|rowspan="2"|{{{fmm}}}
|{{{fmmf}}}
|-
|{{{fmmm}}}
|-
!rowspan="8"|Dam<br />{{{m}}}
|rowspan="4"|{{{mf}}}
|rowspan="2"|{{{mff}}}
|{{{mfff}}}
|-
|{{{mffm}}}
|-
|rowspan="2"|{{{mfm}}}
|{{{mfmf}}}
|-
|{{{mfmm}}}
|-
|rowspan="4"|{{{mm}}}
|rowspan="2"|{{{mmf}}}
|{{{mmff}}}
|-
|{{{mmfm}}}
|-
|rowspan="2"|{{{mmm}}}
|{{{mmmf}}}
|-
|{{{mmmm}}}
|}
c984d06acb5429a4cdaf2b5bf734baf0826dba27
Maurits Friso
0
18
60
2023-10-07T15:37:30Z
WAGRC1
2
Created page with "{{Horse (Individual) | title = Maurits Friso | subheader = KFPS '''760232471''' | image = [[File:Example-serious.jpg|200px|alt=Example alt text]] | caption = Example image. | official_name = | previous_names = | call_names = | sex = Male | gender = Stallion | line = | status = Deceased | condition = | main_discipline = Harness | other_disciplines = Dressage | foaled = 1979 | place_of_birth = Netherlands | breeders = | first_owner = | current_own..."
wikitext
text/x-wiki
{{Horse (Individual)
| title = Maurits Friso
| subheader = KFPS '''760232471'''
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
| caption = Example image.
| official_name =
| previous_names =
| call_names =
| sex = Male
| gender = Stallion
| line =
| status = Deceased
| condition =
| main_discipline = Harness
| other_disciplines = Dressage
| foaled = 1979
| place_of_birth = Netherlands
| breeders =
| first_owner =
| current_owner =
| last_owner =
| date_of_death = 7 December 2003
| place_of_death = Western Australia, Australia
| registrations = [[Koninklijke Friesch Paarden-Stamboek|KFPS]]; [[Australian Friesian Horse Society|AFHS]]
| coat_colour = Black
| height =
| weight =
| girth =
| brand =
| misc_dimensions =
| health_issues =
| carrier_of =
| designated_vet =
| latest_visit =
| medical_conditions =
| medication =
| medical_reports =
| first_keuring =
| latest_keuring =
| last_keuring =
| predicates =
| ster_percentage =
| kroon_percentage =
| other_predicates_percentage =
| preferents =
| competition_awards = * Supreme Champion Friesian (Under-saddle) <sup>(''When?'')</sup>
* Harness Champion <sup>(''When?'')</sup>
* Harness Supreme Champion <sup>(''When?'')</sup>
| records_held =
| sire = [[Dagho 247]]
| dam = [[Lieuwke]]
| grand-sires = [[Tsjalling 235]] x [[Nuttert]]
| grand-dames = [[Truus]] x [[Majoke]]
| total_offspring = ~15 pure-bred, ~9 cross
| total_siblings = 1
| notable_descendants =
| in-breeding =
| other_names =
| location =
| register_(book) =
| studbook_number = KFPS '''760232471'''
| registration_date =
| registrar =
| permit =
| stud =
| trainers =
| microchip_number =
| accredited =
| earnings =
| honours =
| notes =
| below_text =
}}
'''Maurits Friso''' is a Dutch-born Australian Friesian stallion, who was champion and supreme champion in-harness and under-saddle several times during his 24-year long life. He has at least 15 purebred offspring, and at least 9 warm-blood offspring.
== History: ==
''Maurits Friso'' was born in 1979, the Netherlands. At some point being exported to Australia as the second stallion to arrive in Australia, being owned at some point by Chrystine and Colin Duzevich of Narrogin, Western Australia. During ''Maurits Friso'''s career in mainly harness he became a supreme champion, also becoming one under-saddle. He died at the age of 24 on the 7<sup>th</sup> of December in 2003.
=== Ownership Record: ===
{| class="wikitable"
|+ Owner history.
|-
! Start Date: !! Name(s): !! Location: !! Contact: !! End Date:
|-
| Unknown || Chrystine & Colin DUZEVICH || Narrogin, Western Australia || None. || Unknown
|}
== Pedigree ==
{{Pedigree|
name = Maurits Friso, black stallion, 1979|
f = [[Dagho 247]]|
ff = [[Tsjalling 235]]<br/>1967|
fff = [[Hotse]]<br/>1961<br/>KFPS '''196102231'''|
ffff = [[Ritske 202]]<br/>1955|
fffm = [[Noira]]<br/>1953<br/>KFPS '''195339030 '''|
ffm = [[Villie II]]<br/>1957<br/>KFPS '''195746130'''|
ffmf = [[Bouke 174]]<br/>1943|
ffmm = [[Eabeltje]]<br/>1945|
fm = [[Truus]]|
fmf = [[Gerke 220]]<br/>1961<br/>KFPS '''196102201'''|
fmff = [[Age 168]]<br/>1942<br/>KFPS '''194201681'''|
fmfm = [[Eereprijs]]<br/>1945<br/>KFPS '''194525810'''|
fmm = [[Gretaa]]<br/>1961|
fmmf = [[Tabe]]<br/>1956|
fmmm = [[Ofkje]]<br/>1954|
m = [[Lieuwke]]|
mf = [[Nuttert]]<br/>1953|
mff = [[Ewold]]<br/>1945<br/>KFPS '''194501811'''|
mfff = [[Waling 161]]<br/>1940|
mffm = [[Sytske]]<br/>1937<br/>KFPS '''193717410'''|
mfm = [[Bouk<br/>1943]]|
mfmf = [[Obscurant 150]]<br/>1934|
mfmm = [[Rona]]<br/>1936|
mm = [[Majoke]]<br/>1952|
mmf = [[Beint]]<br/>1943|
mmff = [[Tiemen]]<br/>1938<br/>KFPS '''193801591'''|
mmfm = [[Ridske]]<br/>1936|
mmm = [[Empa]]<br/>1945 |
mmmf = [[Plutus]]<br/>1935 |
mmmm = [[Zempa]]<br/>1941 |
}}
e984bf0cb6d5eb523687ab21fb55b8d76d93d1db
61
60
2023-10-07T15:40:11Z
WAGRC1
2
/* Pedigree */
wikitext
text/x-wiki
{{Horse (Individual)
| title = Maurits Friso
| subheader = KFPS '''760232471'''
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
| caption = Example image.
| official_name =
| previous_names =
| call_names =
| sex = Male
| gender = Stallion
| line =
| status = Deceased
| condition =
| main_discipline = Harness
| other_disciplines = Dressage
| foaled = 1979
| place_of_birth = Netherlands
| breeders =
| first_owner =
| current_owner =
| last_owner =
| date_of_death = 7 December 2003
| place_of_death = Western Australia, Australia
| registrations = [[Koninklijke Friesch Paarden-Stamboek|KFPS]]; [[Australian Friesian Horse Society|AFHS]]
| coat_colour = Black
| height =
| weight =
| girth =
| brand =
| misc_dimensions =
| health_issues =
| carrier_of =
| designated_vet =
| latest_visit =
| medical_conditions =
| medication =
| medical_reports =
| first_keuring =
| latest_keuring =
| last_keuring =
| predicates =
| ster_percentage =
| kroon_percentage =
| other_predicates_percentage =
| preferents =
| competition_awards = * Supreme Champion Friesian (Under-saddle) <sup>(''When?'')</sup>
* Harness Champion <sup>(''When?'')</sup>
* Harness Supreme Champion <sup>(''When?'')</sup>
| records_held =
| sire = [[Dagho 247]]
| dam = [[Lieuwke]]
| grand-sires = [[Tsjalling 235]] x [[Nuttert]]
| grand-dames = [[Truus]] x [[Majoke]]
| total_offspring = ~15 pure-bred, ~9 cross
| total_siblings = 1
| notable_descendants =
| in-breeding =
| other_names =
| location =
| register_(book) =
| studbook_number = KFPS '''760232471'''
| registration_date =
| registrar =
| permit =
| stud =
| trainers =
| microchip_number =
| accredited =
| earnings =
| honours =
| notes =
| below_text =
}}
'''Maurits Friso''' is a Dutch-born Australian Friesian stallion, who was champion and supreme champion in-harness and under-saddle several times during his 24-year long life. He has at least 15 purebred offspring, and at least 9 warm-blood offspring.
== History: ==
''Maurits Friso'' was born in 1979, the Netherlands. At some point being exported to Australia as the second stallion to arrive in Australia, being owned at some point by Chrystine and Colin Duzevich of Narrogin, Western Australia. During ''Maurits Friso'''s career in mainly harness he became a supreme champion, also becoming one under-saddle. He died at the age of 24 on the 7<sup>th</sup> of December in 2003.
=== Ownership Record: ===
{| class="wikitable"
|+ Owner history.
|-
! Start Date: !! Name(s): !! Location: !! Contact: !! End Date:
|-
| Unknown || Chrystine & Colin DUZEVICH || Narrogin, Western Australia || None. || Unknown
|}
== Pedigree ==
{{Pedigree|
name = Maurits Friso, black stallion, 1979|
f = [[Dagho 247]]|
ff = [[Tsjalling 235]]<br/>1967|
fff = [[Hotse]]<br/>1961<br/>KFPS '''196102231'''|
ffff = [[Ritske 202]]<br/>1955|
fffm = [[Noira]]<br/>1953<br/>KFPS '''195339030 '''|
ffm = [[Villie II]]<br/>1957<br/>KFPS '''195746130'''|
ffmf = [[Bouke 174]]<br/>1943|
ffmm = [[Eabeltje]]<br/>1945|
fm = [[Truus]]|
fmf = [[Gerke 220]]<br/>1961<br/>KFPS '''196102201'''|
fmff = [[Age 168]]<br/>1942<br/>KFPS '''194201681'''|
fmfm = [[Eereprijs]]<br/>1945<br/>KFPS '''194525810'''|
fmm = [[Gretaa]]<br/>1961|
fmmf = [[Tabe]]<br/>1956|
fmmm = [[Ofkje]]<br/>1954|
m = [[Lieuwke]]|
mf = [[Nuttert]]<br/>1953|
mff = [[Ewold]]<br/>1945<br/>KFPS '''194501811'''|
mfff = [[Waling 161]]<br/>1940|
mffm = [[Sytske]]<br/>1937<br/>KFPS '''193717410'''|
mfm = [[Bouk]]<br/>1943]]|
mfmf = [[Obscurant 150]]<br/>1934|
mfmm = [[Rona]]<br/>1936|
mm = [[Majoke]]<br/>1952|
mmf = [[Beint]]<br/>1943|
mmff = [[Tiemen]]<br/>1938<br/>KFPS '''193801591'''|
mmfm = [[Ridske]]<br/>1936|
mmm = [[Empa]]<br/>1945 |
mmmf = [[Plutus]]<br/>1935 |
mmmm = [[Zempa]]<br/>1941 |
}}
4f24f510eee8b7f49c749420f6e6859d3d47bd89
62
61
2023-10-08T01:05:56Z
WAGRC1
2
wikitext
text/x-wiki
{{Horse (Individual)
| title = Maurits Friso
| subheader = KFPS '''760232471'''
| image = [[File:Example-serious.jpg|200px|alt=Example alt text]]
| caption = Example image.
| official_name =
| previous_names =
| call_names =
| sex = Male
| gender = Stallion
| line =
| status = Deceased
| condition =
| main_discipline = Harness
| other_disciplines = Dressage
| foaled = 1979
| place_of_birth = Netherlands
| breeders =
| first_owner =
| current_owner =
| last_owner =
| date_of_death = 7 December 2003
| place_of_death = Western Australia, Australia
| registrations = [[Koninklijke Friesch Paarden-Stamboek|KFPS]]; [[Australian Friesian Horse Society|AFHS]]
| coat_colour = Black
| height =
| weight =
| girth =
| brand =
| misc_dimensions =
| health_issues =
| carrier_of =
| designated_vet =
| latest_visit =
| medical_conditions =
| medication =
| medical_reports =
| first_keuring =
| latest_keuring =
| last_keuring =
| predicates =
| ster_percentage =
| kroon_percentage =
| other_predicates_percentage =
| preferents =
| competition_awards = * Supreme Champion Friesian (Under-saddle) <sup>(''When?'')</sup>
* Harness Champion <sup>(''When?'')</sup>
* Harness Supreme Champion <sup>(''When?'')</sup>
| records_held =
| sire = [[Dagho 247]]
| dam = [[Lieuwke]]
| grand-sires = [[Tsjalling 235]] x [[Nuttert]]
| grand-dames = [[Truus]] x [[Majoke]]
| total_offspring = ~12 pure-bred, ~5 cross
| total_siblings = 1
| notable_descendants =
| in-breeding =
| other_names =
| location =
| register_(book) =
| studbook_number = KFPS '''760232471'''
| registration_date =
| registrar =
| permit =
| stud =
| trainers =
| microchip_number =
| accredited =
| earnings =
| honours =
| notes =
| below_text =
}}
'''Maurits Friso''' is a Dutch-born Australian Friesian stallion, who was champion and supreme champion in-harness and under-saddle several times during his 24-year long life. He has at least 12 purebred offspring, and at least 5 warm-blood offspring.
<br>
== History: ==
''Maurits Friso'' was born in 1979, the Netherlands. At some point being exported to Australia as the second stallion to arrive in Australia, being owned at some point by Chrystine and Colin Duzevich of Narrogin, Western Australia. During ''Maurits Friso'''s career in mainly harness he became a supreme champion, also becoming one under-saddle. He died at the age of 24 on the 7<sup>th</sup> of December in 2003.
=== Ownership Record: ===
{| class="wikitable"
|+ Owner history.
|-
! Start Date: !! Name(s): !! Location: !! Contact: !! End Date:
|-
| Unknown || Chrystine & Colin DUZEVICH || Narrogin, Western Australia || None. || Unknown
|}
<br>
== Pedigree ==
{{Pedigree|
name = Maurits Friso, black stallion, 1979|
f = [[Dagho 247]]|
ff = [[Tsjalling 235]]<br/>1967|
fff = [[Hotse]]<br/>1961<br/>KFPS '''196102231'''|
ffff = [[Ritske 202]]<br/>1955|
fffm = [[Noira]]<br/>1953<br/>KFPS '''195339030 '''|
ffm = [[Villie II]]<br/>1957<br/>KFPS '''195746130'''|
ffmf = [[Bouke 174]]<br/>1943|
ffmm = [[Eabeltje]]<br/>1945|
fm = [[Truus]]|
fmf = [[Gerke 220]]<br/>1961<br/>KFPS '''196102201'''|
fmff = [[Age 168]]<br/>1942<br/>KFPS '''194201681'''|
fmfm = [[Eereprijs]]<br/>1945<br/>KFPS '''194525810'''|
fmm = [[Gretaa]]<br/>1961|
fmmf = [[Tabe]]<br/>1956|
fmmm = [[Ofkje]]<br/>1954|
m = [[Lieuwke]]|
mf = [[Nuttert]]<br/>1953|
mff = [[Ewold]]<br/>1945<br/>KFPS '''194501811'''|
mfff = [[Waling 161]]<br/>1940|
mffm = [[Sytske]]<br/>1937<br/>KFPS '''193717410'''|
mfm = [[Bouk]]<br/>1943]]|
mfmf = [[Obscurant 150]]<br/>1934|
mfmm = [[Rona]]<br/>1936|
mm = [[Majoke]]<br/>1952|
mmf = [[Beint]]<br/>1943|
mmff = [[Tiemen]]<br/>1938<br/>KFPS '''193801591'''|
mmfm = [[Ridske]]<br/>1936|
mmm = [[Empa]]<br/>1945 |
mmmf = [[Plutus]]<br/>1935 |
mmmm = [[Zempa]]<br/>1941 |
}}
== Progeny: ==
{| class="wikitable sortable"
|+ List of purebred progeny.
|-
! Offspring: !! Foaled: !! Gender: !! Dam:
|-
| [[Marias Black Opal]] || 1987 || Filly || [[Nanke]]
|-
| [[Henri Friso Royal Avalon]] || 1984 || Colt || [[Nynke]]
|-
| [[Dagho Friso]] || 1982 || Colt || [[Otske]]
|-
| [[Alitske Friso]] || N/A || Filly || [[Otske]]
|-
| [[Anneke]] || N/A || Filly || [[Manke]]
|-
| [[Caspara Friso]] || N/A || Filly || [[Nanke]]
|-
| [[Clasina Friso]] || N/A || Filly || [[Nynke]]
|-
| [[Doetse S]] || N/A || Filly || [[Pronkje]]
|-
| [[Mona Lisa Fan Friso]] || N/A || Filly || [[Alitske Friso]]
|-
| [[Marleen Petraa Friso]] || N/A || Filly || [[Nynke J]]
|-
|}
1b68bf0278bdb353a35f424086519ea8e3883b4f
64
62
2023-10-08T02:38:44Z
WAGRC1
2
wikitext
text/x-wiki
{{Horse (Individual)
| title = Maurits Friso
| subheader = KFPS '''760232471'''
| image = [[File:MauritsFriso(1).jpg|200px|alt=Black and white profile image of Maurits Friso.]]
| caption = Maurits Friso (unknown date).
| official_name =
| previous_names =
| call_names =
| sex = Male
| gender = Stallion
| line =
| status = Deceased
| condition =
| main_discipline = Harness
| other_disciplines = Dressage
| foaled = 1979
| place_of_birth = Netherlands
| breeders =
| first_owner =
| current_owner =
| last_owner =
| date_of_death = 7 December 2003
| place_of_death = Western Australia, Australia
| registrations = [[Koninklijke Friesch Paarden-Stamboek|KFPS]]; [[Australian Friesian Horse Society|AFHS]]
| coat_colour = Black
| height =
| weight =
| girth =
| brand =
| misc_dimensions =
| health_issues =
| carrier_of =
| designated_vet =
| latest_visit =
| medical_conditions =
| medication =
| medical_reports =
| first_keuring =
| latest_keuring =
| last_keuring =
| predicates =
| ster_percentage =
| kroon_percentage =
| other_predicates_percentage =
| preferents =
| competition_awards = * Supreme Champion Friesian (Under-saddle) <sup>(''When?'')</sup>
* Harness Champion <sup>(''When?'')</sup>
* Harness Supreme Champion <sup>(''When?'')</sup>
| records_held =
| sire = [[Dagho 247]]
| dam = [[Lieuwke]]
| grand-sires = [[Tsjalling 235]] x [[Nuttert]]
| grand-dames = [[Truus]] x [[Majoke]]
| total_offspring = ~12 pure-bred, ~5 cross
| total_siblings = 1
| notable_descendants =
| in-breeding =
| other_names =
| location =
| register_(book) =
| studbook_number = KFPS '''760232471'''
| registration_date =
| registrar =
| permit =
| stud =
| trainers =
| microchip_number =
| accredited =
| earnings =
| honours =
| notes =
| below_text =
}}
'''Maurits Friso''' is a Dutch-born Australian Friesian stallion, who was champion and supreme champion in-harness and under-saddle several times during his 24-year long life. He has at least 12 purebred offspring, and at least 5 warm-blood offspring.
<br>
== History: ==
''Maurits Friso'' was born in 1979, the Netherlands. At some point being exported to Australia as the second stallion to arrive in Australia, being owned at some point by Chrystine and Colin Duzevich of Narrogin, Western Australia. During ''Maurits Friso'''s career in mainly harness he became a supreme champion, also becoming one under-saddle. He died at the age of 24 on the 7<sup>th</sup> of December in 2003.
=== Ownership Record: ===
{| class="wikitable"
|+ Owner history.
|-
! Start Date: !! Name(s): !! Location: !! Contact: !! End Date:
|-
| Unknown || Chrystine & Colin DUZEVICH || Narrogin, Western Australia || None. || Unknown
|}
<br>
== Pedigree ==
{{Pedigree|
name = Maurits Friso, black stallion, 1979|
f = [[Dagho 247]]|
ff = [[Tsjalling 235]]<br/>1967|
fff = [[Hotse]]<br/>1961<br/>KFPS '''196102231'''|
ffff = [[Ritske 202]]<br/>1955|
fffm = [[Noira]]<br/>1953<br/>KFPS '''195339030 '''|
ffm = [[Villie II]]<br/>1957<br/>KFPS '''195746130'''|
ffmf = [[Bouke 174]]<br/>1943|
ffmm = [[Eabeltje]]<br/>1945|
fm = [[Truus]]|
fmf = [[Gerke 220]]<br/>1961<br/>KFPS '''196102201'''|
fmff = [[Age 168]]<br/>1942<br/>KFPS '''194201681'''|
fmfm = [[Eereprijs]]<br/>1945<br/>KFPS '''194525810'''|
fmm = [[Gretaa]]<br/>1961|
fmmf = [[Tabe]]<br/>1956|
fmmm = [[Ofkje]]<br/>1954|
m = [[Lieuwke]]|
mf = [[Nuttert]]<br/>1953|
mff = [[Ewold]]<br/>1945<br/>KFPS '''194501811'''|
mfff = [[Waling 161]]<br/>1940|
mffm = [[Sytske]]<br/>1937<br/>KFPS '''193717410'''|
mfm = [[Bouk]]<br/>1943]]|
mfmf = [[Obscurant 150]]<br/>1934|
mfmm = [[Rona]]<br/>1936|
mm = [[Majoke]]<br/>1952|
mmf = [[Beint]]<br/>1943|
mmff = [[Tiemen]]<br/>1938<br/>KFPS '''193801591'''|
mmfm = [[Ridske]]<br/>1936|
mmm = [[Empa]]<br/>1945 |
mmmf = [[Plutus]]<br/>1935 |
mmmm = [[Zempa]]<br/>1941 |
}}
== Progeny: ==
{| class="wikitable sortable"
|+ List of purebred progeny.
|-
! Offspring: !! Foaled: !! Gender: !! Dam:
|-
| [[Marias Black Opal]] || 1987 || Filly || [[Nanke]]
|-
| [[Henri Friso Royal Avalon]] || 1984 || Colt || [[Nynke]]
|-
| [[Dagho Friso]] || 1982 || Colt || [[Otske]]
|-
| [[Alitske Friso]] || N/A || Filly || [[Otske]]
|-
| [[Anneke]] || N/A || Filly || [[Manke]]
|-
| [[Caspara Friso]] || N/A || Filly || [[Nanke]]
|-
| [[Clasina Friso]] || N/A || Filly || [[Nynke]]
|-
| [[Doetse S]] || N/A || Filly || [[Pronkje]]
|-
| [[Mona Lisa Fan Friso]] || N/A || Filly || [[Alitske Friso]]
|-
| [[Marleen Petraa Friso]] || N/A || Filly || [[Nynke J]]
|-
|}
[[Category:Friesians]]
[[Category:Deceased Friesians]]
[[Category:Male Friesians]]
[[Category:Stallions]]
[[Category:Deceased Stallions]]
[[Category:Australian Friesians]]
[[Category:AFHS Friesians]]
[[Category:Harness Friesians]]
[[Category:Friesians Under-saddle]]
[[Category:Champion Friesians]]
[[Category:Supreme Champion Friesians]]
[[Category:Australian Friesians]]
[[Category:Friesians born in the Netherlands]]
0a6d65e1588954870980e95749bc8b0b09ef5bc4
File:MauritsFriso(1).jpg
6
19
63
2023-10-08T02:29:22Z
WAGRC1
2
[[Category:Images]]
[[Category:Images of Maurits Friso]]
wikitext
text/x-wiki
== Summary ==
[[Category:Images]]
[[Category:Images of Maurits Friso]]
6ad1e7d7cbcf82ef5c4314807d262182ddc1e57d
Category:Friesians
14
20
65
2023-10-08T03:02:36Z
WAGRC1
2
Created page with "All Friesians."
wikitext
text/x-wiki
All Friesians.
2e68643cc46f244a020635610c591272ad44c451
Category:Deceased Friesians
14
21
66
2023-10-08T03:03:08Z
WAGRC1
2
Created page with "All dead Friesians."
wikitext
text/x-wiki
All dead Friesians.
bb1781d321da4778ffc46a970a18e8623cf63e4f
Category:Male Friesians
14
22
67
2023-10-08T03:07:15Z
WAGRC1
2
Created page with "Male Friesians"
wikitext
text/x-wiki
Male Friesians
6c0125d25329a77ddaf0cb339a61d803c87dff83